Home > Operation and Maintenance > CentOS > How to modify dns in centos7

How to modify dns in centos7

王林
Release: 2020-05-23 13:44:43
Original
5685 people have browsed it

How to modify dns in centos7

Edit the /etc/NetworkManager/NetworkManager.conf file

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

Add dns=none at the end of the file

[main]
#plugins=ifcfg-rh,ibft
dns=none
Copy after login

Restart the service

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

Edit the /etc/resolv.conf file

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

Modify as follows:

# Generated by NetworkManager
nameserver 114.114.114.114
nameserver 8.8.8.8
Copy after login

Recommended tutorial:centos tutorial

The above is the detailed content of How to modify dns in centos7. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template