Linux管理 设置主机名


设置主机名


[root@yugo /tmp 11:04:42]#hostnamectl set-hostname pyyuc
[root@pyyuc ~ 11:05:12]#hostname
pyyuc
[root@centos7 ~]#: hostnamectl
  Static hostname: centos7.young
        Icon name: computer-vm
          Chassis: vm
       Machine ID: ee70dec0f355401ca243affd75e37838
          Boot ID: a19d2818a0904e839e211d519887a214
   Virtualization: vmware
 Operating System: CentOS Linux 7 (Core)
      CPE OS Name: cpe:/o:centos:centos:7
           Kernel: Linux 3.10.0-957.10.1.el7.x86_64
     Architecture: x86-64