Home > Article > Operation and Maintenance > centos cannot resolve domain name
The solution is as follows:
First, add the dns settings at the end in /etc/sysconfig/network-scripts/ifcfg-eth0.
For example: DNS1=8.8.8.8
(Recommended tutorial: centos usage tutorial)
114.114.114.114 and 8.8.8.8, these two DNS is very pure, so there is no need to worry about DNS hijacking caused by ISP operators, and it is provided to users for free.
114.114.114.114 is the DNS commonly used by China Mobile, China Telecom and China Unicom.
8.8.8.8 is the DNS provided by GOOGLE, and this address is universal.
Then, restart the network card:
service network restart
Related video tutorial recommendations: linux video tutorial
The above is the detailed content of centos cannot resolve domain name. For more information, please follow other related articles on the PHP Chinese website!