change hostname under centos
#hostname newhostname
#hostname
when poweroff, the hostname is still stale without changed
--------------------------
to change hostname permanently.following these steps
#vi /etc/hosts
127.0.0.1 newhostname localhost
#vi /etc/systemconfig/network
HOSTNAME=newhostname
#/etc/init.d/network restart
if the above command not work, the just reboot the system.
本文介绍如何在CentOS系统中永久更改主机名。通过编辑 /etc/hosts 和 /etc/sysconfig/network 文件,并重启网络服务来实现主机名的永久变更。如果上述步骤未能生效,则建议重新启动系统。
1870

被折叠的 条评论
为什么被折叠?



