I use vmwarevirtual machine to install Ubuntu and CentOS. both use NAT mode to connect to the network, but Ubutun can access the internet normally, while CentOS cannot connect to the network. The original Centos7 does not enable the wired Nic by default, and must be manually enabled. The procedure is as follows: first, open the terminal. Cd/etc/sysconfig/network-scripts/ls to check the numbers behind ifcfg-eno.
I use vmwarevirtual machine to install Ubuntu and CentOS. both use NAT mode to connect to the network, but Ubutun can access the internet normally, while CentOS cannot connect to the network.
The original Centos7 does not enable the wired Nic by default, and must be manually enabled.
The procedure is as follows:
First, open the terminal.
Cd/etc/sysconfig/network-scripts/
Ls: check the number next to ifcfg-eno. take eno32 as an example.
Switch to the root user,
Vim ifcfg-eno32.
Edit this file
Set ONBOOT = yes
Enable network connection automatically
: Wq save and exit
Service network restart network
Then restart CentOS to access the internet!