hostnamectl 명령어를 사용해서 Hostname 변경 방법

현재 Hostname 확인

[root@localhost ~]# hostnamectl

   Static hostname: localhost.localdomain

         Icon name: computer-vm

           Chassis: vm

        Machine ID: e928099cb82c4ac5b6d3f30ae71629bc

           Boot ID: 6932216e9fc14f64b197e8d40dae830d

    Virtualization: vmware

  Operating System: CentOS Linux 7 (Core)

       CPE OS Name: cpe:/o:centos:centos:7

            Kernel: Linux 3.10.0-327.el7.x86_64

      Architecture: x86-64

 

Hostname sapehp8db01 변경

[root@localhost ~]# hostnamectl set-hostname sapehp8db01

 

변경된 Hostname 확인

[root@localhost ~]# hostnamectl

   Static hostname: sapehp8db01

         Icon name: computer-vm

           Chassis: vm

        Machine ID: e928099cb82c4ac5b6d3f30ae71629bc

           Boot ID: 6932216e9fc14f64b197e8d40dae830d

    Virtualization: vmware

  Operating System: CentOS Linux 7 (Core)

       CPE OS Name: cpe:/o:centos:centos:7

            Kernel: Linux 3.10.0-327.el7.x86_64

      Architecture: x86-64

 

+ Recent posts