Ubuntu 永久禁用resolvconf
我想在Ubuntu 16.04中永久禁用resolvconf 现在我的/etc/network/interfaces包含Ubuntu 永久禁用resolvconf,ubuntu,ubuntu-16.04,Ubuntu,Ubuntu 16.04,我想在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
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
但此选项在操作系统重新启动后不是永久性的
~/# systemctl disable systemd-resolved.service
~/# service systemd-resolved stop
编辑/etc/NetworkManager/NetworkManager.conf并将其添加到[main](或更改):
然后:
顺便问一下,为什么默认设置这个?很烦人,至少让nm连接编辑器上的手动配置优先于此。对于未安装network manager和systemd resolved的Ubuntu服务器,这并不能回答这个问题。
dns=default
~/# systemctl restart network-manager