CentOS 7 / RHEL View Host Name Details Using hostnamectl Command

Fig.04: CentOS 7 / RHEL View Host Name Details Using hostnamectl Command

Fig.04: CentOS 7 / RHEL View Host Name Details Using hostnamectl Command

To view the current CentOS/Red Hat (RHEL) Linux system hostname and related information, type:
# hostnamectl status
Sample outputs:

   Static hostname: server1.cyberciti.biz
Transient hostname: centos7
         Icon name: computer
           Chassis: n/a
        Machine ID: b5470b10ccfd49ed8e4a3b0e953a53c3
           Boot ID: f79de79e2dac4670bddfe528e826b61f
    Virtualization: oracle
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-229.1.2.el7.x86_64
      Architecture: x86_64

You can also use any one of the following command too:

# cat /etc/hostname
server1.cyberciti.biz
# hostname 
server1.cyberciti.biz

Examples and usage: RHEL / Centos Linux 7: Change and Set Hostname Command

Leave a Comment