sudo: unable to resolve host xxx解决办法

问题:

root@wiki:~# sudo lsb_release -a
sudo: unable to resolve host wiki
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.1 LTS
Release:        14.04
Codename:       trusty

可见我的主机名为wiki(机器hostname),每次执行sudo 就会出现这个警告sudo: unable to resolve host wiki。

解决办法:修改/etc/hosts

改前:127.0.0.1      localhost

改后:127.0.0.1      localhost  wiki

posted @ 2015-01-22 09:46  starof  阅读(1167)  评论(0编辑  收藏  举报