我想在Ubuntu 16.04中永久禁用resolvconf。
现在我的/ etc / network / interfaces包含
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
网络服务启动后立即使用
配置/etc/resolv.conf# 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
我想要的是使用自定义名称服务器和域修改我的/etc/resolv.conf,而无需修改我的/ etc / network / interfaces并在网络重启或操作系统重新启动后使配置永久化。
我设法在网络重启
后使其永久化resolvconf --disable-update
但是,在重新启动操作系统后,此选项不是永久性的。
答案 0 :(得分:0)
~/# systemctl disable systemd-resolved.service
~/# service systemd-resolved stop
编辑/etc/NetworkManager/NetworkManager.conf并将其添加到[main](或更改):
dns=default
然后:
~/# systemctl restart network-manager
顺便说一句,为什么要默认设置它?非常烦人,至少让nm-connection-editor上的 Manual 配置优先于此。