修改/etc/resolv.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
修改后保持即可
https://www.cnblogs.com/alusss/p/12631133.html#3887316758