-
Disable and stop the systemd-resolved service:
sudo systemctl disable systemd-resolved.service sudo systemctl stop systemd-resolved
-
Then put the following line in the
[main]
section of your/etc/NetworkManager/NetworkManager.conf
:dns=default
-
Delete the symlink
/etc/resolv.conf
rm /etc/resolv.conf
-
Restart network-manager
sudo service network-manager restart or sudo systemctl restart NetworkManager.service
Last active
April 25, 2024 08:17
-
-
Save zoilomora/f7d264cefbb589f3f1b1fc2cea2c844c to your computer and use it in GitHub Desktop.
How to disable systemd-resolved in Ubuntu
Why not just rename instead of remove?
mv /etc/resolv.conf /etc/resolv.conf.del
@euntae: With just stopping instead of also disabling systemd-resolved it will be active again after a reboot but the way you described it the entries in resolv.conf won't get used anyway at least on Ubuntu 24.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
root@www:
:> systemctl disable systemd-resolved:> systemctl stop systemd-resolvedroot@www:
root@www:
:> rm -f /etc/resolv.conf:> cat < /etc/resolv.confroot@www:
nameserver 9.9.9.9
nameserver 8.8.8.8
nameserver 1.1.1.1
EOF
root@www:~:> reboot