Home > Article > Operation and Maintenance > Linux cannot resolve domain name
Cause:
The domain name cannot be resolved because there is no DNS in Linux.
Solution:
First use the cd command to enter etc;
Then use the vi editor to edit resolv.conf
Continue Add the domain name after nameserver
.
Recommended online video tutorial: linux video tutorial
For example:
nameserver 8.8.8.8 nameserver 114.114.114.114
Then: wq
Save;
Finally just restart the network.
There are three commands to restart the network:
service network restart rcnetwork restart /etc/rc.d/network restart
Recommended related articles and tutorials: linux tutorial
The above is the detailed content of Linux cannot resolve domain name. For more information, please follow other related articles on the PHP Chinese website!