Ubuntu修改主机名
查看当前主机名
1 | hostname |
以下操作管理员身份运行
修改主机名
1 | vim /etc/hostname |
修改 hosts 文件(为了解析新的主机名)
1 | vim /etc/hosts |
重启,问题解决
1 | reboot |
本文采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 ShiGuang
评论
查看当前主机名
1 | hostname |
以下操作管理员身份运行
修改主机名
1 | vim /etc/hostname |
修改 hosts 文件(为了解析新的主机名)
1 | vim /etc/hosts |
重启,问题解决
1 | reboot |