Solution:
1. Enter ifconfig to check the network card status
2. Edit the /etc/sysconfig/network-scripts/ifcfg-xxx file
Enter the following command:
vi /etc/sysconfig/network-scripts/ifcfg-ens33
(This ens33 is the name of the Ethernet card corresponding to the above picture, some may be ifcfg-eth0)
(recommended tutorial : centos usage tutorial)
Change ONBOOT=no to ONBOOT=yes
Press the Esc key, enter: wq, save and exit.
3. Restart the network
Enter the following command to restart the network
service network restart
4. Enter ifconfig again to view the network card. You should see inet information in the Ethernet configuration. This You can access the Internet now.
Recommended related video tutorials: linux video tutorial
The above is the detailed content of What should I do if the centos system connection is unreachable?. For more information, please follow other related articles on the PHP Chinese website!