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!