想修改服务器的 hostname,随便搜了一下,一堆中英文教程就是教你先该 network 的文件,改 hosts 文件,然后重启什么的,感觉太麻烦。
又找了找,找到了一个靠谱的。只针对 CentOS 7,Ubuntu 14.04 经测试也可以使用。一条命令:
|
|
输入密码,然后就可以了。不需要重启。
hostnamectl
这个工具是systemd
带的,所以迁移到systemd
的系统应该都是可以的。ppt.cc/fuhP4x ppt.cc/fVjECx ppt.cc/fEnHsx ppt.cc/fRZTnx ppt.cc/fSZ3cx ppt.cc/fLOuCx ppt.cc/fE9Nux ppt.cc/fL5Kyx ppt.cc/f71Yqx tecmint.com linuxcool.com linux.die.net linux.it.net.cn ostechnix.com unix.com ubuntugeek.com runoob.com man.linuxde.net ppt.cc/fwpCex ppt.cc/fxcLIx ppt.cc/foX6Ux linuxprobe.com linuxtechi.com howtoforge.com linuxstory.org systutorials.com ghacks.net linuxopsys.com ppt.cc/ffAGfx ppt.cc/fJbezx ppt.cc/fNIQDx ppt.cc/fCSllx ppt.cc/fybDVx ppt.cc/fIMQxx ppt.cc/fKlBax
|
|
hostnamectl
这个工具是systemd
带的,所以迁移到systemd
的系统应该都是可以的。
No comments:
Post a Comment