Introduction to systemd-resolved
I’ve seen systemd-resolved cause some headaches in multi-network setups, so it’s worth understanding how it works. As part of the systemd suite, systemd-resolved is a DNS resolver that’s enabled by default on many modern Linux distributions, including Ubuntu and Fedora. The real trick is configuring it to avoid DNS surprises.
Configuring systemd-resolved
To get systemd-resolved working the way you want, you need to know how it uses DNS servers. It combines the DNS servers provided by your system’s network configuration with those specified in the /etc/systemd/resolved.conf file. Don’t bother with the network configuration; just modify the resolved.conf file to specify your preferred DNS servers. For example, to use Google’s public DNS servers, add the following lines to the [Resolve] section: