环境: ubuntu16.04
操作步骤:
1、修改 /etc/resolv.conf
nameserver 114.114.114.114
nameserver 114.114.114.114
options timeout:1
options attempts:3
2、安装 resolveconf
apt install resolveconf
3、修改配置文件 /etc/resolvconf/resolv.conf.d/head
# 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 114.114.114.114
nameserver 114.114.114.114
options timeout:1
options attempts:3
4、执行更新
resolveconf -u
5、检查
cat /etc/resolv.conf