CentOS修改hostname

作者:欧阳 发布时间:2013年05月09日 阅读: 2,824 分类:Linux摘要

今天发现平时总是一向都修改两个配置文件。
/etc/hosts与/etc/sysconfig/network
CentOS只需要修改network文件就可。
Debian配置文件为 /etc/hostname

临时设置hostname只需要直接命令
hostname  newname即可,重启恢复原来设置。