Home  >  Article  >  Operation and Maintenance  >  Linux cannot resolve domain name

Linux cannot resolve domain name

王林
王林Original
2019-12-04 14:03:045965browse

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: wqSave;

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!

Statement:
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