The question of what program controls resolv.conf is a fun (as in ripping your hair out) rabbit hole explore.
It took me way too long to arrive at the conclusion that the most direct and DE-independent way to set one's preferred DNS resolvers is to do so through
isc-dhcp-client while also making certain to disable competing programs that would otherwise attempt to overwrite resolv.conf (such as Network Manager, which you have installed).
First, I prevent Network Manager from interfering by editing /etc/NetworkManager/NetworkManager.conf
And then apply the changes
Code: Select all
sudo systemctl restart NetworkManager
Then I insert my preferred resolvers to /etc/dhcp/dhclient.conf
Code: Select all
supersede domain-name-servers 9.9.9.9;
*If you want to override the DNS servers provided by DHCP entirely and force the system to use the ones you provide, use the supersede entry:
supersede domain-name-servers
Then renegotiate DHCP
This yields reliable, unchanging resolver entries at /etc/resolv.conf
I think a lot of old hats assume this is just obvious knowledge. But people that haven't been doing the whole *nix thing since the 90s are left to trial-by-fire.