sudo gedit /etc/NetworkManager/NetworkManager.conf
注释掉 dns=dnsmasq
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq
[ifupdown]
managed=false
再编辑
/etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
输入dig 测试下
XXX
XXX
XXX
;; Query time: 279 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Tue Mar 21 16:23:09 CST 2017
;; MSG SIZE rcvd: 239
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Tue Mar 21 16:23:09 CST 2017
;; MSG SIZE rcvd: 239
看到server 8.8.8.8 说明生效