@
pengtdyd 执行情况如下:
[lv@hadoop102 bin]$ hostnamectl
Static hostname: hadoop102
Icon name: computer-vm
Chassis: vm
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-1160.el7.x86_64
Architecture: x86-64
-------------------------------------------------------------
[lv@hadoop103 bin]$ hostnamectl
Static hostname: hadoop103
Icon name: computer-vm
Chassis: vm
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-1160.el7.x86_64
Architecture: x86-64