編輯/etc/NetworkManager/NetworkManager.conf文件
[root@localhost ~]# vim /etc/NetworkManager/NetworkManager.conf
在文件末尾添加dns=none
[main] #plugins=ifcfg-rh,ibft dns=none
重啟服務
[root@localhost ~]# systemctl restart NetworkManager.service
編輯/etc/resolv.conf文件
[root@localhost ~]# vim /etc/resolv.conf
修改如下:
# Generated by NetworkManager nameserver 114.114.114.114 nameserver 8.8.8.8
推薦教程:centos教程