Configure Systemd Nameservers
You almost always want to configure your nameservers somewhere else, such as in a netplan configuration etc. However, if you wish to configure your nameservers through systemd where it will manage your /etc/resolv.conf file, then run:
sudo editor /etc/systemd/resolved.conf
Then set something like below within the [Resolve]
section of the config file:
[Resolve]
DNS=192.168.0.222 192.168.0.221
FallbackDNS=8.8.8.8
References
Last updated: 1st June 2024
First published: 20th May 2023
First published: 20th May 2023