歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu 11.10下如何設置主機名

Ubuntu 11.10下如何設置主機名

日期:2017/2/28 15:54:57   编辑:Linux教程

在Ubuntu 11.10終端可以用hostname查看主機名。

主機名存放在/etc/hostname中 ,sudo gedit /etc/hostname 修改後保存

/etc/hosts還有一個備份 , sudo gedit /etc/hosts 修改保存,重啟即可。


127.0.0.1 localhost
127.0.1.1 www-linuxidc-com

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Copyright © Linux教程網 All Rights Reserved