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

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

王林
Release: 2020-03-19 16:01:51
Original
6635 people have browsed it

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
Copy after login

(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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template