[centos]设置主机名

1、设置

hostnamectl set-hostname 名字

2、查看是否生效

hostnamectl status

3、打开一个新链接就可以了

 

你可能感兴趣的:(linux,centos,linux,运维)