Home > Operation and Maintenance > CentOS > What should I do if centos7 cannot access the Internet?

What should I do if centos7 cannot access the Internet?

王林
Release: 2020-05-20 14:06:31
Original
3067 people have browsed it

What should I do if centos7 cannot access the Internet?

First enter the directory /etc/sysconfig/network-scripts

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

and then find the name of the network card configuration file. This network card configuration file can be viewed through the ifconfig command. As shown below, the network card name of the virtual machine here is ens33.

What should I do if centos7 cannot access the Internet?

Then use the ls command to view the network card configuration file name:

What should I do if centos7 cannot access the Internet?

Then edit the last line of the ifcfg-ens33 file, Change ONBOOT=no to ONBOOT=yes, as shown below:

What should I do if centos7 cannot access the Internet?

Finally enter: wq to save and exit, and then restart the network.

service network restart
Copy after login

Recommended tutorial: centos tutorial

The above is the detailed content of What should I do if centos7 cannot access 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