(1): 首先切換到root用戶
$sudo su
(2):修改/etc/hosts的內容
#vim /etc/hosts
將原來到主機名換掉例如:
127.0.0.1 yan
退出保存修改:
:wq!
(3):修改/etc/hostname文件中的內容
$vim /etc/hostname
改為:yan
退出保存!
(4)重新啟動后,再次打開終端(Ctrl+Alt+T)就可以看到效果。
(1): 首先切換到root用戶
$sudo su
(2):修改/etc/hosts的內容
#vim /etc/hosts
將原來到主機名換掉例如:
127.0.0.1 yan
退出保存修改:
:wq!
(3):修改/etc/hostname文件中的內容
$vim /etc/hostname
改為:yan
退出保存!
(4)重新啟動后,再次打開終端(Ctrl+Alt+T)就可以看到效果。
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。