If you are having wget: unable to resolve host address issues with your Ubuntu machine, you are in the right place.
It is simple to set up DNS on a Linux machine. Just add a couple of entries to /etc/resolv.conf and you’re done.
# Use Google's public DNS servers.
nameserver 8.8.4.4
nameserver 8.8.8.8
But things change and now it’s not that simple. If you now edit /etc/resolv.conf on Ubuntu you’ll find that the edits are ephemeral. If you restart (or even hibernate) your machine then they’ll be overwritten by default content.
nameserver 127.0.0.53
search Home
This is pretty simple to fix though.
-
Install the
resolvconfpackage.sudo apt install resolvconf -
Edit
/etc/resolvconf/resolv.conf.d/headand add the following:# Make edits to /etc/resolvconf/resolv.conf.d/head. nameserver 8.8.4.4 nameserver 8.8.8.8 -
Restart the
resolvconfservice.sudo service resolvconf restart
Fix should be permanent.
