sudo: unable to resolve host xxx
虽然sudo 还是可以正常执行, 但是警告讯息每次都出来,而这只是机器在反解上的问题, 所以就直接从/etc/hosts 设定, 让xxx(hostname) 可以解回127.0.0.1 的IP 即可.

/etc/hosts 

(原文)

27.0.0.1 localhost

127.0.1.1       localhost.localdomain   localhost

# The following lines are desirable for IPv6 capable hosts

::1     localhost ip6-localhost ip6-loopback

ff02::1 ip6-allnodes

ff02::2 ip6-allrouters

(更新)

127.0.0.1 localhost

127.0.0.1 xxx

127.0.1.1       localhost.localdomain   localhost

# The following lines are desirable for IPv6 capable hosts

::1     localhost ip6-localhost ip6-loopback

ff02::1 ip6-allnodes

ff02::2 ip6-allrouters