sudo gedit(編輯器) /etc/hostname
裏面只有你的電腦名 更改爲新的名字重啓電腦後生效
切記以sudo 管理員權限進入
此外:還要在/etc/hosts中將原來的用戶名 改爲新的用戶名 (我的在第二行)
不然使用sudo 時會出現sudo: unable to resolve host ***
sudo gedit(編輯器) /etc/hostname
裏面只有你的電腦名 更改爲新的名字重啓電腦後生效
切記以sudo 管理員權限進入
此外:還要在/etc/hosts中將原來的用戶名 改爲新的用戶名 (我的在第二行)
不然使用sudo 時會出現sudo: unable to resolve host ***