Home > Operation and Maintenance > CentOS > What to do if CentOS7 cannot connect to the network

What to do if CentOS7 cannot connect to the network

angryTom
Release: 2020-03-17 10:31:20
Original
6185 people have browsed it

What to do if CentOS7 cannot connect to the network

What to do if CentOS7 cannot connect to the network

Step one: Modify the configuration file

Use vi editor to modify /etc/sysconfig/network-scripts/ifcfg-eth0

Enter the /etc/sysconfig/network-scripts directory (recommended learning: MySQL video tutorial)

cd /etc/sysconfig/network-scripts              # 打开配置文件
vi ifcfg-ens33                                 # 这里可能你的文件名不是这个,但是找前面是 ifcfg-ens 的就是了
Copy after login

Change ONBOOT=no in the file to ONBOOT=yes, then save and exit (don’t forget to save!!)

What to do if CentOS7 cannot connect to the network

Step 2: Restart the network service

After the modification is completed, you need to restart the network service for it to take effect. Use the following command.

service network restart
Copy after login

This article comes from the PHP Chinese website, CentOS usage tutorial column, please pay attention to this column for more related tutorials!

The above is the detailed content of What to do if CentOS7 cannot connect to the network. For more information, please follow other related articles on the PHP Chinese website!

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