Home > Operation and Maintenance > CentOS > centos7 cannot connect to the Internet

centos7 cannot connect to the Internet

王林
Release: 2020-03-18 15:43:01
Original
4382 people have browsed it

centos7 cannot connect to the Internet

1. Modify the configuration file

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

Enter the /etc/sysconfig/network-scripts directory and the command is as follows:

cd /etc/sysconfig/network-scripts
Copy after login

Open the configuration file

vi ifcfg-ens33
Copy after login

(Recommended tutorial: centos usage tutorial)

Your file name may not be this, but just look for ifcfg-ens in front of it.

centos7 cannot connect to the Internet

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

centos7 cannot connect to the Internet

2. Restart the network service

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

service network restart
Copy after login

Related video tutorial recommendations: linux video tutorial

The above is the detailed content of centos7 cannot connect to the Internet. 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