In order to record tutorials for novice users
Website building video tutorial, Naiba installed a CentOS7 system using a VMware virtual machine on the computer. After installation, it couldn't connect to the internet. After searching, the reason was found: after a default minimal virtual machine installation of CentOS7, 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 start on 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 pings successfully, it proves the CentOS7 system inside the virtual machine can access the internet.
Comments are closed
The comment function for this article is closed. If you have any questions, please feel free to contact us through other channels.