===========================================================
新版的mint或debian7.8下上面的方法好像不行。静态ip生效后只保留下面的重启才ok。(应该和路由设置有关系,原本可以上网的debian7.5后来也不行,本地连接也不用开启共享连接)
auto lo
修改BIOS的默认设置来解决在虚拟环境下对64位系统的支持:
选择Security----System Security--- Virtualization Technology(VTx)和 Virtualization Technology Directed I/O(VTd)后的Disable改成Enable。
================================================================================================================
# 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
# The primary network interface
# auto enp0s3
# iface enp0s3 inet dhcp
##########################Ubuntu 16.04.4 LTS###################################
auto lo
iface lo inet loopback
auto enp0s3
iface enp0s3 inet static
address 192.168.120.246
netmask 255.255.255.0
gateway 192.168.120.1
重启网络即可sudo /etc/init.d/networking restart