centos 命令行修改主机名

# vi /etc/sysconfig/network
# 把localhost.localdomain 修改为 localhost.com
# 保存退出

# vi /etc/hosts
# 把localhost.localdomain 修改为 localhost.com

# reboot

# 查看主机名  uname -n

 

posted @ 2014-10-24 15:51  捕蛇者说  阅读(321)  评论(0编辑  收藏  举报