4

In /etc/resolv.conf on modern distros link Mint 17 and Ubuntu 16, there's a warning:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1

How do I make resolv.conf work the old way so that I can edit this file by hand, without any other program or process overwriting it?

3

As an alternative, you can specify base DNS servers for resolvconf at /etc/resolvconf/resolv.conf.d/base, which won't be overwritten. It uses the same syntax. That way you can keep running Ubuntu or Mint the default way. Then tell resolvconf to regenerate resolv.conf with sudo resolvconf -u.

Hover, you can remove resolvconf: sudo apt-get remove resolvconf. It is safe to do so. Then write your desired DNS resolvers into /etc/resolv.conf.

You may not be able to use DNS management features in other programs that automatically manage your network (networkmanager) anymore.

  • 2
    If you're uncomfortable with removing the resolvconf package, remove /etc/resolv.conf (on systems with the resolvconf package it will be a symlink to /run/resolvconf/resolv.conf) and create the file with the contents you desire. – Deathgrip Jun 28 '17 at 16:27
  • @Deathgrip: That's what I've done before, I but couldn't remember what it was that I did. Removing resolvconf is also a good solution. – Nick Jul 3 '17 at 0:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.