步骤: 1.命令: sudo vim /etc/network/interfaces 修改成如下内容: # interfaces(5) file used by ifup(8) and ifdown(8) 2 auto lo 3 4 iface lo inet loopback 5 auto eth0 6 iface eth0 inet static #地址 7 address ***.***.***.*** #子网掩码 8 netmask ***.***.***.*** #默认网关 9 gateway ***.***.***.*** 2.命令:sudo vim /etc/resolv.conf 修改为以下内容: 1 # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf( 8) 2 # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN 3 #windows中dns 4 nameserver ***.***.***.*** 3.命令:sudo /etc/init.d/networking restart 相关地址