cd /etc #第一步进入etc目录 vi hostname # 访问hostname 文件 键盘输入i 进入编辑模式,然后修改你想要的root名 # 然后ESC,输入:wq reboot $重启服务器