/run/resolvconf/resolv.conf gets erased each time I restart, and I can't use internet without it (16.04)
Solution 1:
You should restore the resolv.conf symbolic link and add required nameservers to /etc/resolvconf/resolv.conf.d/base. Follow these steps:
-
Reinstall resolvconf package:
$ sudo apt-get -o Dpkg::Options::="--force-confmiss" install --reinstall resolvconf
-
Add required nameservers to /etc/resolvconf/resolv.conf.d/base:
$ sudo bash -c 'echo "nameserver 8.8.8.8" >> /etc/resolvconf/resolv.conf.d/base' $ sudo bash -c 'echo "nameserver 8.8.4.4" >> /etc/resolvconf/resolv.conf.d/base'
-
Regenerate resolv.conf:
$ sudo resolvconf -u
-
Restart your network interfaces:
$ sudo ifdown -a ; sudo ifup -a
Solution 2:
I think the resolv.conf is not updated automatically. You can reconfigure it
sudo dpkg-reconfigure resolvconf