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-04-02 09:25:42
Original
3852 people have browsed it

What should I do if centos7 cannot access the Internet?

1. Find the network card configuration file

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

What should I do if centos7 cannot access the Internet?

##2. Edit the network card configuration file

vi /etc/sysconfig/network-scripts/ifcfg-ens33
Copy after login

Then press i key to enter text insertion editing mode. Then press the i key to enter text insertion editing mode.

Focus on setting BOOTPROTO=dhcp and ONBOOT=yes.

After modifying, press the Esc key first, then enter a colon (:), then enter wq to save and exit.

3. Restart the network

service network restart
Copy after login
Recommended related tutorials:

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