Home > Article > Operation and Maintenance > 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
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!