Home  >  Article  >  Operation and Maintenance  >  What should I do if the centos system connection is unreachable?

What should I do if the centos system connection is unreachable?

王林
王林Original
2020-03-19 16:01:516629browse

What should I do if the centos system connection is unreachable?

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!

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