需要安装resolvconf包
# sudo apt install resolvconf
然后在/etc/network/interfaces 写入
dns-nameservers 114.114.114.114 8.8.8.8
注意: 多个dns以空格隔开