Rocky_Linux_8
Sponsored Link

Set Hostname2021/07/20

 
If you would like to change Host Name of your System, set like follows.
[1] Change hostname. (but when System restarted, it will be back).
# show current hostname

[root@localhost ~]#
localhost.localdomain
# change hostname

[root@localhost ~]#
hostname dlp.srv.world

[root@localhost ~]#
dlp.srv.world    
# changed

[2] Change hostname permanently.
[root@localhost ~]#
hostnamectl set-hostname dlp.srv.world
# show settings

[root@localhost ~]#
   Static hostname: dlp.srv.world
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 98bc67d7659a4dd185060002cd4cc38a
           Boot ID: 7ab4cf30a6dc447c9a673f6b9872cdb4
    Virtualization: kvm
  Operating System: Rocky Linux 8.4 (Green Obsidian)
       CPE OS Name: cpe:/o:rocky:rocky:8.4:GA
            Kernel: Linux 4.18.0-305.3.1.el8_4.x86_64
      Architecture: x86-64
Matched Content