Resolv.conf deprecated
resolv.conf
# 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 search Home
Before systemctl was implemented, you would put the DNS nameservers in resolv.conf
Since the implementation of systemctl the resolv.conf file is no longer user edited. The package that makes the change is called resolvconf.
A script called /etc/network/if-up.d/000resolvconf is responsible for overwriting resolv.conf
see: /sbin/resolvconf -a "${IFACE}.${ADDRFAM}"
It is possible to 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
STEPS TO MANUALLY ADDING DNS SERVER USING /etc/resolvconf/resolv.conf.d/base
1. Open the file in the editor
sudo vi /etc/resolvconf/resolv.conf.d/base
2. add the DNS server you desire and save
nameserver 8.8.8.8
3. force reload so it writes to /etc/resolv.conf
resolvconf -u