/etc/network/interfaces使用与以下非常相似的内容进行更新后,我该如何/etc/resolv.conf进行更新?我尝试过(以 root 身份)resolver -u,service networking restart但没有奏效。我还修复了符号链接resolv.conf并resolver -u再次尝试。最后沮丧地我重新启动,这确实通过重建/etc/resolv.conf.
Ubuntu 12.04,64 位服务器,安装所有最新补丁。
示例/etc/network/interfaces:
iface eth0 inet static
address 192.168.3.3
netmask 255.255.255.0
gateway 192.168.3.1
dns-search example.com
dns-nameservers 192.168.3.45 192.168.8.10
Run Code Online (Sandbox Code Playgroud)