Solution to install CentOS7 under VMware and cannot access the Internet

VMware virtual machine installed CentOS 7, using NAT mode, CentOS cannot connect to the network.

The reason is that Centos 7 does not enable wired network cards by default and needs to be manually turned on.

The operation steps are as follows:

First, open a terminal.

cd /etc/sysconfig/network-scripts/

ls to see what is the corresponding number after ifcfg-ens, take ens32 as an example

vi ifcfg-ens32

Edit the file and
set ONBOOT=yes
to enable automatic network connection
: wq Save and exit
service network restart Restart the network
so that CentOS can go online!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326350055&siteId=291194637