Ubuntu 上配置静态的ip

先关掉或卸掉 network-manager。
然后,改动/etc/network/interfaces 如下:
(由于是静态ip,你当然知道把例子中那些东西改成你自己的)
auto lo eth0
iface lo inet loopback
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254

然后
sudo /etc/init.d/networking restart
就搞定了。
原文地址:https://www.cnblogs.com/hhjiang14/p/4238542.html