sudo apt install unbound
sudo systemctl stop systemd-resolved
sudo systemctl disable systemd-resolved
sudo cp /etc/resolv.conf /etc/resolv.conf_bak
sudo rm -rf /etc/resolv.conf
sudo vim /etc/NetworkManager/NetworkManager.conf
[main]
dns=unbound
reboot
cat /etc/resolv.conf
现在查看,可以看到DNS不会被本地覆盖了。