AlmaLinux 9
Sponsored Link

Set Hostname2023/02/24

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 ~]#
# change hostname

[root@localhost ~]#

[root@localhost ~]#    
# changed

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

[root@localhost ~]#
 Static hostname:
       Icon name: computer-vm
         Chassis: vm
      Machine ID: a58698696eb84c26a8a9dafe360ee2b7
         Boot ID: 5832821ae9904bd6a73922ade645c949
  Virtualization: kvm
Operating System: AlmaLinux 9.1 (Lime Lynx)
     CPE OS Name: cpe:/o:almalinux:almalinux:9::baseos
          Kernel: Linux 5.14.0-162.6.1.el9_1.x86_64
    Architecture: x86-64
 Hardware Vendor: Red Hat
  Hardware Model: KVM
Matched Content