vi /etc/sysconfig/network hostname=你想设置的主机名 不重启器的情况下使显示名称变成 hostname 主机名 转载于:https://www.cnblogs.com/lehao/p/3909171.html