User Tools

Site Tools


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:


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


sudo systemctl restart NetworkManager.service
ubuntu/disablednscacheubuntu.txt · Last modified: 2022/11/13 19:38 by tschulz