How can I disable systemd-resolved in Ubuntu 17.04?
Disabling it with systemctl disable
didn't work, the service seems to be restarted (by Networkmanager?)
dnssystemdsystemd-resolved
How can I disable systemd-resolved in Ubuntu 17.04?
Disabling it with systemctl disable
didn't work, the service seems to be restarted (by Networkmanager?)
Best Answer
This method works on the Ubuntu releases 17.04 (Zesty), 17.10 (Artful), 18.04 (Bionic), 18.10 (Cosmic), 19.04 (Disco) and 20.04 (Focal):
Disable and stop the systemd-resolved service:
Then put the following line in the
[main]
section of your/etc/NetworkManager/NetworkManager.conf
:Delete the symlink
/etc/resolv.conf
Restart NetworkManager
Also be aware that disabling systemd-resolvd might break name resolution in VPN for some users. See this bug on launchpad (Thanks, Vincent).