3

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?

Nick
  • 1,081
  • 6
  • 17
  • 29

1 Answers1

4

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.

However, 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.

Rachel Frei
  • 484
  • 3
  • 6
  • 3
    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 03 '17 at 00:09