How to see the CURRENT DNS resolver Ubuntu is using

Ubuntu broke DNS resolution by creating a fancy wrapper around it. As a consequence, you’ll see a whole lot of noise in /etc/resolv.conf and not your actual name server. The noise includes information on “not making changes” in the file.

To see your WHAT THE ACTUAL name servers, do this:

resolvectl status

or

systemd-resolve --status

It does the same thing.

To update your ACTUAL name servers, do this:

resolvectl dns eth0 1.1.1.1 8.8.4.4

To persist the actual change, read more and more and more internet help guides and get frustrated.

By some accounts you have to uncomment DNS= in /etc/systemd/resolved.conf but hoorah it doesn’t work and life is short.

Either way, after experimenting with the file resolved.conf you’ll have to restart the service.

systemctl restart systemd-resolved

Reference

Tags

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top