ubuntu 12.04 以固定 IP 地址连接网络并配置DNS

sudo vim /etc/network/interfaces  

auto eth0
iface eth0 inet static
    address 192.168.2.155
    netmask 255.255.255.0
    gateway 192.168.2.1
    dns-nameservers 218.85.157.99 218.85.152.99


sudo /etc/init.d/networking restart
原文地址:https://www.cnblogs.com/tianciliangen/p/3488507.html