On Linux Mint, when I view the /etc/resolv.conf file, the first comment states that the /etc/resolv.conf file is generated by resolvconf(8).

~ $ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)

To paraphrase the resolvconf(8) man page:

the resolvconf program is run by DHCP clients such as dhclient

I run dhclient wlan0.

~ $ dhclient wlan0

Dhclient should cause the resolvconf program to update /etc/resolv.conf. The /var/lib/dhcp/dhclient.leases file verifies that I am able to lease the IP address of the nameserver (

~ $ cat /var/lib/dhcp/dhclient.leases 
lease {
  interface "wlan0";
  . . .
  option domain-name-servers;
  . . .

However, the /etc/resolv.conf file is not updated. The /etc/resolv.conf file has nameserver

~ $ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
search software.eng.apl

There are no nameservers listed in /etc/network/interfaces.

~ $ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

I am not sure what I am missing here to get the /etc/resolv.conf file to update using the nameserver being leased from the DHCP server. The DHCP server is a Linux CentOS machine using DHCPD.

  • Is /etc/resolv.conf a file or a symlink?
    – fpmurphy
    Commented Apr 16, 2017 at 2:06
  • It looks like /etc/resolv.conf is symbolically linked to /run/resolvconf/resolv.conf. Both files are identical. Thanks for the suggestion. I'll chase this and see if it turns into an answer to the problem. Commented Apr 16, 2017 at 2:44
  • 1
    With nameserver, you are running some kind of nameserver or DNS proxy yourself. That proxy in turn will use the nameserver provided by dhclient. If you really want this to be visible in resolv.conf, disable your DNS proxy.
    – dirkt
    Commented Apr 16, 2017 at 5:19
  • Possibly the same issue: unix.stackexchange.com/questions/175526/…
    – Kusalananda
    Commented Apr 16, 2017 at 7:27

3 Answers 3


Mint and other modern distros ship with mdns by default, which wraps the regular public DNS with a local "decentralized" wrapper which enables zeroconf support for your local network. Basically, a local DNS server resolves names in the local network it has discovered, then falls back to the (now proxied) public DNS for public Internet resolution, i.e. for names outside of your local network.

In so many words, your resolv.conf is correct and appropriate for this scenario, and if mdns has problems accessing your ISP's nameserver, you should look inside its configuration - though of course, if you don't care about zeroconf support, disabling mdns (and then probably also Avahi) lets you manage resolv.conf in the traditional fashion.

See also e.g. https://help.ubuntu.com/community/HowToZeroconf

  • Fascinating. Thank you very much for sharing this intel around mdns. I sure am glad there is a logic reason for this behavior. I apologize, I do not yet have enough reputation to up-vote your answer. Commented Apr 16, 2017 at 12:47

you can edit /etc/dhcp/dhclient.conf edit the line by uncommenting #prepend domain-name-server

  • Can you explain how this answers the question? Commented Aug 3, 2017 at 14:37
  • using prepend domain-name-server allows you to add custom domain name servers Commented Aug 3, 2017 at 14:47

I had the same problem as described in the OP but none of the previous answers worked for me. I'm running Linux Mint 18 and I discovered this problem when trying to use networking features inside a docker container. Docker was expecting to resolve DNS values from /etc/resolv.conf. But since the only nameserver listed was, docker networking was unsuccessful.

I found another solution on askubuntu that worked for me. I'm posting it here as a cross reference in case it helps someone.

NetworkManager is the program which (via the resolvconf utility) inserts address into resolv.conf. NetworkManager inserts that address if and only if it is configured to start an instance of the dnsmasq program to serve as a local forwarding nameserver. That dnsmasq instance listens for queries at address

If you do not want to use a local forwarding nameserver then configure NetworkManager not to start a dnsmasq instance and not to insert that address. In /etc/NetworkManager/NetworkManager.conf comment out the line dns=dnsmasq

sudo vim /etc/NetworkManager/NetworkManager.conf


and restart the NetworkManager service.

sudo service network-manager restart

In this mode, NetworkManager updates /etc/resolv.conf (still via resolvconf) to include the nameserver addresses NetworkManager has for active connections.

If you want to disable the resolvconf mechanism for updating resolv.conf and just use a static resolv.conf file, do the following.

sudo rm -f /etc/resolv.conf  # Delete the symbolic link
sudo vim /etc/resolv.conf   # Create static file

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .