修改 /etc/network/interfaces
后,重启 reboot
# 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 static
address 10.0.2.15
netmask 255.255.255.0
gateway 10.0.2.2
auto eth1
allow-hotplug eth1
iface eth1 inet dhcp
-
auto eth0
: 开机自启 -
inet static
:静态IP -
inet dhcp
:动态
NOTE :开机菜单里的网卡为 未托管状态,不必理会



网友评论