Ping www.baidu.com first Check whether the network is normal. If you can ping successfully, it is recommended that you check whether a proxy is set up. Ping does not use a proxy. echo $http_proxy Look at the output. If there is output, it proves that the proxy is configured. Enter ifconfig Check if the IP settings are correct Then you may need to configure dns and gateway This is the configuration command:
For example, modify the IP of the network card eth0 to 192.168.1.111 ifconfig eth0 192.168.1.111 netmask 255.255.255.0ifconfig eth0 192.168.1.111 netmask 255.255.255.0 修改网关为192.168.1.1 route add default gw 192.168.1.1 Linux命令行修改dns echo "nameserver 114.114.114.114">> /etc/resolv.conf 重启网络服务 /etc/rc.d/init.d/network restrartModify the gateway to 192.168.1.1
route add default gw 192.168.1.1 🎜Linux command line to modify dns🎜echo "nameserver 114.114.114.114">> /etc/resolv.conf🎜Restart the network service🎜/etc/rc.d/init.d/ network restrart🎜
Dear, try pinging www.baidu.com first to see if you can resolve the Baidu address? I guess you haven’t configured the DNS address
Ping www.baidu.com first
Check whether the network is normal. If you can ping successfully, it is recommended that you check whether a proxy is set up. Ping does not use a proxy. echo $http_proxy Look at the output. If there is output, it proves that the proxy is configured.
Enter ifconfig
Check if the IP settings are correct
Then you may need to configure dns and gateway
This is the configuration command:
For example, modify the IP of the network card eth0 to 192.168.1.111
ifconfig eth0 192.168.1.111 netmask 255.255.255.0
ifconfig eth0 192.168.1.111 netmask 255.255.255.0
修改网关为192.168.1.1
route add default gw 192.168.1.1
Linux命令行修改dns
echo "nameserver 114.114.114.114">> /etc/resolv.conf
重启网络服务
/etc/rc.d/init.d/network restrart
Modify the gateway to 192.168.1.1route add default gw 192.168.1.1
🎜Linux command line to modify dns🎜echo "nameserver 114.114.114.114">> /etc/resolv.conf
🎜Restart the network service🎜/etc/rc.d/init.d/ network restrart
🎜