Ubuntu Configure systemd-resolved

Latest Ubuntu/Debian use systemd-resolved for DNS resolution. On a fresh Ubuntu 19.04 install DNS failed to resolve.

root@ubuntu19:/# ping serverok.in
ping: serverok.in: Temporary failure in name resolution
root@ubuntu19:/#

To fix this, create file

mkdir /etc/systemd/resolved.conf.d/
vi /etc/systemd/resolved.conf.d/dns_servers.conf

Add content

Advertisement

[Resolve]
DNS=8.8.8.8 1.1.1.1

Restart systemd-resolved

systemctl restart systemd-resolved

You can find systemd-resolvd status with command

resolvectl status
systemd-resolve --status

To resolve a domain, use

resolvectl query serverok.in

Add a comment

Leave a Reply

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

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement