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

To fix this, create file

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

Add content


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

Need help with Linux Server or WordPress? We can help!


Leave a Reply

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