首先关闭网络图形界面
sudo service network-manager stop
然后
sudo vim /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8) #auto lo #iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.119.142 netmask 255.255.255.0 gateway 192.168.119.254 auto eth1 iface eth1 inet static address 192.168.119.145 netmask 255.255.255.0 gateway 192.168.119.254
然后重启网络
sudo /etc/init.d/networking restart
原文链接:https://www.f2er.com/ubuntu/356371.html