ubantu系统下永久修改主机名 1、sudo vim /etc/hostname 修改为你想要的主机名 2、sudo vim /etc/hosts 修改为相应的主机名 3、shutdown -r now 重启