I encountereda serious problem with my resolv.conf file that whenever i restarts the system the file goes balnk so i didnt get network connection..So i need to edit the resolv.conf file always and enter the nameserver details..to auto fill the nameserver details in resolv.conf there’s a tricky way
cd /etc/resolvconf/resolv.conf.d sudo cp -p head head.orig #backup copy, always do this sudo vim head
The top of the file is a scary warning. The file /etc/resolv.conf is autogenerated from the contents of this file; the warning is there so it will get put in /etc/resolv.conf when /etc/resolv.conf is generated. To the end of the file, add
nameserver <ip_of_nameserver>
Save and quit.To finish up, regenerate /etc/resolv.conf so the changes are applied right now:
sudo resolvconf -u
it will still be there the next time your machine boots or your network service is restarted.
Happy Hacking 🙂