linux 修改主机名
SUSE 11
# hostname example //临时
# vi /etc/HOSTNAME //永久
---------------------------------
Redhat 6.0 以及更早版本
# hostname example //临时
# vi /etc/sysconfig/network //永久
-----------------------------------
Redhat 7.0
# hostnamectl set-hostname example //永久
# hostnamectl status //查看
# vi /etc/hostname //永久
天下事有难易乎?为之,则难者亦易矣;不为,则易者亦难矣。