虚拟机在NAT模式下没有网络
1.检查网卡是否启动
ifconfig -a
![](https://img-blog.csdnimg.cn/img_convert/2d600c0f0c10e0295a5fa6d47f2a9636.png)
2.检查网络配置文件
vim /etc/network/interfaces
3.修改配置为DHCP
auto eth0
iface eth0 inet dhcp
![](https://img-blog.csdnimg.cn/img_convert/570be876ba533964a7b59e3ff9771803.png)
4.重启网络服务
systemctl restart networking
虚拟机在NAT模式下没有网络
1.检查网卡是否启动
ifconfig -a
2.检查网络配置文件
vim /etc/network/interfaces
3.修改配置为DHCP
auto eth0
iface eth0 inet dhcp
4.重启网络服务
systemctl restart networking