七叶笔记 » Linux » centos7怎么修改dns

centos7怎么修改dns

编辑/etc/NetworkManager/NetworkManager.conf文件

[root@localhost ~]# vim /etc/NetworkManager/NetworkManager.conf

在文件末尾添加dns=none

[main]#plugins=ifcfg-rh,ibftdns=none

重启服务

[root@localhost ~]# systemctl restart NetworkManager.service

编辑/etc/resolv.conf文件

[root@localhost ~]# vim /etc/resolv.conf

修改如下:

# Generated by NetworkManagernameserver 114.114.114.114nameserver 8.8.8.8

推荐教程:centos教程

相关文章