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

What should I do if centos7 cannot access the Internet in the virtual machine?

王林
Release: 2020-03-25 11:32:48
Original
2828 people have browsed it

What should I do if centos7 cannot access the Internet in the virtual machine?

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

Command:

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

What should I do if centos7 cannot access the Internet in the virtual machine?

Then check ifcfg-ens33 in the file in the directory, usually this is it. Some people may have other numbers. Use the vim command to open it for editing:

Command:

vim ifcfg-ens33
Copy after login

What should I do if centos7 cannot access the Internet in the virtual machine?

(Recommended tutorial: centos usage tutorial)

At this time, enter the vim editing content, change ONBOOT=no to ONBOOT=yes, and then Save and exit:

What should I do if centos7 cannot access the Internet in the virtual machine?

#Finally enter the command service network restart in the terminal to restart the network service.

Command:

service network restart
Copy after login

What should I do if centos7 cannot access the Internet in the virtual machine?

The above is the detailed content of What should I do if centos7 cannot access the Internet in the virtual machine?. 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