virtual box 加新的网卡,配置一个是NAT转换,一个仅Host only 开机后发现不能上网 改网卡配置 vim /etc/network/interfaces 原有的: # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback 改成 # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp auto eth1 iface eth1 inet dhcp 重启网卡 /etc/init.d/networking restart 查看 ip addr 发现两个网卡都有地址了