执行命令:vi /etc/network/interfaces
或者:nano /etc/network/interfaces
或者: gedit /etc/network/interfaces
动态自动获取ip信息:
interface 文件内容如下:
auto eth0
iface eth0 inet dhcp
静态配置ip:
interface 文件内容下:
auto eth0
iface eth0 inet static
address 192.168.33.201 (静态ip地址)
netmask 255.255.255.0 (子网掩码)
gateway 192.168.33.1 (网关地址)