How to prevent networkmanager from overwriting /etc/resolve.conf on startup?
The archwiki already has a section explaining how to do this here. But i'm asking because its quite complex . Do I just have to edit dns.conf ? and set dns=none ?
About this post
- Posted
- Archived
- Score
- 1 · 67% up
- Kind
- Text
- ID
- ong335
1 comment
There are several ways.
/etc/resolv.confwith a symlink (NetworkManager defaults to[main].rc-manager=symlinkwhich will not touch symlinks). This seems the simplest, because your act of creating a symlink is taken as configuration and nothing else is needed.chattr +ithe file to make it immutable.[main].dns=noneor[main].rc-manager=unmanagedinNetworkManager.conf. Best by dropping a snippet to/etc/NetworkManager/conf.d/90-my-resolvconf.conf. Seeman NetworkManager.conf.(after doing 2) or 3), issue a
systemctl reload NetworkManager).Maybe just do 1).