sudo: unable to resolve host ubuntu-server

sudo: unable to resolve host ubuntu-server

My /etc/hosts file:

127.0.0.1       localhost
127.0.1.1       ubuntu-server

# 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

/etc/hostname gives:

ubuntu-server

I think there is some other setting that causes the unable to resole host, but I cannot find these.

Edit the /etc/hosts, you have a typo 127.0.1.1 is not loopback, change it to 127.0.0.1, save and reboot.

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 變更 )

Twitter picture

You are commenting using your Twitter account. Log Out / 變更 )

Facebook照片

You are commenting using your Facebook account. Log Out / 變更 )

Google+ photo

You are commenting using your Google+ account. Log Out / 變更 )

連結到 %s