
In order to record for novice usersWebsite Building Video Tutorial, Naiba installed a CentOS7 system using a VMware virtual machine on his computer. After installation, it couldn't connect to the internet. After searching, he found the reason: after a default minimal installation of CentOS7 on a virtual machine, the default network card is not set to start on boot. So, you just need to manually enable it.
The method is as follows:
Use the following command to edit the file (yours might not be ifcfg-ens33)
vi /etc/sysconfig/network-scripts/ifcfg-ens33
Change ONBOOT=no to ONBOOT=yes, which means enable at boot.
If you don't know how to modify it, please enter the code in the following order
i //进入编辑模式 用键盘上下左右,移动到ONBOOT=no 删除no,并且修改为yes 按ESC 输入:wq回车
Then restart the network card: service network restart
Use ip addr to view the assigned IP address, ping blog.naibabiji.com, if it can ping successfully, it proves that the CentOS7 system in the virtual machine can access the internet.