/etc/resolve.conf gets overwritten on reboot
I'm trying to modify my /etc/resolve.conf to
nameserver 8.8.8.8
nameserver 8.8.4.4
But, after I restart my Linode, Network Manager will automatically overwrite my changes.
How can I prevent this from happening?
1 Reply
Hey there,
Depending on your distribution, Network Manager may automatically overwrite changes to resolve.conf.
This will happen for example in CentOS7.
To prevent Network Manager from overwriting your changes to resolv.conf, you will want to check out:
/etc/sysconfig/network-scripts/ifcfg-
And you will want to remove the DNS1, DNS2, etc lines from this file. This is the information that Network Manager uses to overwrite your changes to resolve.conf, so after you remove those lines you will be able to manually edit resolve.conf without it being overwritten.
Hopefully that helps!