刚刚在virutalbox下安装centos7,一直不能上网,之前安装的ubuntu就可以,virtualbox配置相同,找不到eth0网卡,有lo网卡,有一个叫enp0s3的网卡,但没有ip地址,新装的系统,不应该有什么问题呀。找了很多资料,最终,那个enp0s3就是虚拟的网卡,默认安装完成后,dhcp没有随启动一起启动,修改网卡配置文件后,问题解决了。
操作步骤:
1. cd /etc/sysconfig/network-scripts/
2. vim ifcfg-enp0s3
3.修改启动开启dhcp(ONBOOT=yes):
4.重启
5.检查上网
系统信息:
virtualbox:5.1.12
虚拟机网络:nat
centos版本: