Home  >  Article  >  Operation and Maintenance  >  Linux external network cannot ping

Linux external network cannot ping

王林
王林Original
2020-02-15 15:06:102974browse

Linux external network cannot ping

The solution is as follows:

Method 1:

Modify resolv.conf

vi /etc/resolv.conf

Add the following content:

   nameserver 114.114.114.114 (电信的DNS)
   nameserver 8.8.8.8(googel的DNS)

You can ping the external network.

(Free learning video sharing: linux video tutorial)

Method 2:

ip a or ifconfig check the network card used, and then Enter /etc/sysconfig/network-scripts, find the corresponding network card and modify it.

vi /etc/sysconfig/network-scripts/ifcfg-ethx

Linux external network cannot ping

Restart the network card

service network restart

Recommended related articles and tutorials: linux tutorial

The above is the detailed content of Linux external network cannot ping. 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
Previous article:Is macOS a linux system?Next article:Is macOS a linux system?