'Disable resolvconf permanently
I'd like to disable resolvconf permanently in Ubuntu 16.04.
Right now my /etc/network/interfaces contains
auto eth0
iface eth0 inet static
address 192.168.43.175
netmask 255.255.255.0
network 192.168.43.0
broadcast 192.168.43.255
gateway 192.168.43.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.43.240
dns-search domain.local
As soon as the networking service starts configures the /etc/resolv.conf with
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.43.240
search domain.local
What I want to is to modify my /etc/resolv.conf with custom nameservers and domains without having to modify my /etc/network/interfaces and having the config permanent after networking restart or OS reboots.
I managed to make it permanent after networking restart doing
resolvconf --disable-update
But this option is not permanent after OS reboot.
Solution 1:[1]
~/# systemctl disable systemd-resolved.service
~/# service systemd-resolved stop
Edit /etc/NetworkManager/NetworkManager.conf and add this to [main](or change it):
dns=default
Then:
~/# systemctl restart network-manager
By the way, why set this by default? So annoying, at least let the Manual configuration on the nm-connection-editor take precedence over this.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | fweno |
