man NetworkManager.conf
-
Using the CLI edit
/etc/NetworkManager/NetworkManager.conf
-
Search for the [main] section in this file. It should look something like this:
[main]
dns=default
plugins=keyfile
autoconnect-retries-default=0
rc-manager=file
- Now change dns=default to dns=none just after the [main] tag like this:
[main]
dns=none
plugins=keyfile
autoconnect-retries-default=0
rc-manager=file
- Save the file and restart NetworkManager.service:
sudo systemctl restart NetworkManager.service
- Edit
resolv.conf
and add the DNS-server of your choice.
Next time you reboot your /etc/resolv.conf file will not get updated when using nm (network-manager).
Hope this helps.