127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback ip6-loopback
fe00::0 ip6-localnet ff00::0 ip6-mcastPRefix ff02::1 ip6-allnodes ff02::2 ip6-allroutersff02::3 ip6-allhosts
在127.0.0.1 localhost 后面加上主機名稱(hostname) 即可, /etc/hosts 內容修改成如下:127.0.0.1 localhost abc #要保證這個名字與 /etc/hostname中的主機名一致才有效# 或改成下面這兩行 #127.0.0.1 localhost#127.0.0.1 abc
這樣設完后, 使用sudo 就不會再有那個提示信息了。
新聞熱點
疑難解答