DNS resolver stopped working after upgrade to 20.04

Solution 1:

I just installed Ubuntu 20.04, and had to remove netplan (I have my reasons). I then had a name resolution problem to solve. Here's how I fixed it:

Edit /etc/systemd/resolved.conf and change/add this line:

DNS=1.1.1.1

(I'm using CloudFlare's DNS server here.)

Then change the /etc/resolv.conf symlink like this:

sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

Last, reboot. I hope this helps!

Solution 2:

I figured out the easiest way to resolve this.

It seems to be related to differences in how earlier versions handled dns Vs 20.04. Something during the upgrade process doesn't handle the changes properly, so it's easiest to just force the issue by reinstalling a few packages

apt install --reinstall resolvconf network-manager libnss-resolve

Reboot the system and it should come right up