How network manager is resolving localhost without /etc/hosts

Shashwat Kumar shashwatkmr.001 at gmail.com
Sun Dec 20 20:57:48 UTC 2015


I tried to make a new mapping in /etc/hosts which didn't work. After
searching I found that network-manager does not use /etc/hosts but dnsmasq is
used as local dns resolver.

To confirm this design, I commented every line in /etc/hosts and flush
dnsmasq cache using

sudo /etc/init.d/nscd restart

and restarted network-manager

sudo service network-manager restart

But to my surprise ping localhost was still resolving to 127.0.0.1. As per
my knowledge localhost mapping is only maintained in /etc/hosts. So how
localhost was still being resolved? Is there any information that I am
missing?

Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20151221/dae5daa5/attachment.html>


More information about the ubuntu-users mailing list