TL;DR: config network card file
I met this problem when I installed minimal version of CentOS 7.9 on virtualbox. It results from the default minimal setting which turns off the network card service. Therefore, we just need to reconfig the network card setting.
1
2
3
4
5
6
7
8
9
10
11
# check network card info
ip addr
# check corresponding network card file
cd /etc/sysconfig/network-scripts/
# modify network card file, change ONBOOT=no to ONBOOT=yes
sudo vi [NETWORK CARD FILE]
# restart network service
service network restart