Managing Hostnames of Your Systems

Use hostnamectl to manage hostnames, like this:

STATUS:
======
[root@old-server3 ~]# hostnamectl status
   Static hostname: old-server3
         Icon name: computer
           Chassis: n/a
        Machine ID: f48a5dd0******ccb7826e53c82ab3ab
           Boot ID: 188f491bf49b454e8*******4bf4e2bd
  Operating System: Red Hat Enterprise Linux Server 7.1 (Maipo)
       CPE OS Name: cpe:/o:redhat:enterprise_linux:7.1:GA:server
            Kernel: Linux 3.10.0-229.ael7b.ppc64le
      Architecture: ppc64le

Change it using 'SET':
=====================

[root@old-server3 ~]# hostnamectl set-hostname new-server8

[root@old-server3 ~]# hostnamectl status
   Static hostname: new-server8
         Icon name: computer
           Chassis: n/a
        Machine ID: f48a5dd0******ccb7826e53c82ab3ab
           Boot ID: 188f491bf49b454e8*******4bf4e2bd
  Operating System: Red Hat Enterprise Linux Server 7.1 (Maipo)
       CPE OS Name: cpe:/o:redhat:enterprise_linux:7.1:GA:server
            Kernel: Linux 3.10.0-229.ael7b.ppc64le
      Architecture: ppc64le
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s