User Tools

Site Tools


ubuntu:disablednscacheubuntu

This is an old revision of the document!


Disable DNS Caching on Ubuntu

Disable the systemd-resolved service and stop it:

sudo systemctl disable systemd-resolved.service
sudo service systemd-resolved stop

Put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf:

...
[main]
dns=default
...

Delete the symlink /etc/resolv.conf

rm /etc/resolv.conf

create new /etc/resolv.conf

vim /etc/resolv.conf

Restart network-manager

sudo service network-manager restart
ubuntu/disablednscacheubuntu.1649104764.txt.gz · Last modified: 2022/04/04 15:39 by tschulz