Alibaba Cloud server appears: sudo: unable to resolve host

In the Ubuntu environment, assuming that the machine name is abc (the hostname of the machine), this warning message appears every time sudo is executed:
sudo: unable to resolve host abc
Although sudo can still be executed normally, it is set directly from /etc/hosts , so that abc(hostname) can resolve the IP of 127.0.0.1.   

Just add the hostname after 127.0.0.1 localhost:

127.0.0.1       localhost abc 






Reprinted from: http://blog.csdn.net/ichuzhen/article/details/8241847


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325605631&siteId=291194637