centos7 修改主机名
程序员文章站
2024-03-14 14:17:10
...
@ centos 7 修改主机名
centos 7 下
hostnamectl set-hostname centos123 修改主机名, 立刻生效且重启有效
[[email protected] ~]# hostnamectl set-hostname centos132
[[email protected] ~]# hostnamectl
Static hostname: centos132
Icon name: computer-vm
Chassis: vm
Machine ID: 66bbcb439432451d93debc3d5d9b6278
Boot ID: 76b0c9f77bb74eef9de7076e579a1f8b
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-514.el7.x86_64
Architecture: x86-64
[[email protected] ~]# ^C