编辑 :vim /etc/network/interfaces
基本配置如下:
#eth0会在系统启动时被自动配置
auto eth0
#eth0接口具有一个静态(static)IP配置
iface eth0 inet static
#配置eth0接口的IP,网络号,子网掩码,广播地址和网关。
address 192.168.0.42
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1