Ubuntu 下IP设置

1、ubuntu系统

修改IP地址:sudo gedit /etc/network/interfaces

auto eth0

iface eth0 inet static

address 219.218.122.168

netmask 255.255.255.0

gateway 219.218.122.255

2、ubuntu系统修改DNS: sudo gedit /etc/resolv.conf

nameserver 202.194.15.12

3、使网络生效:

sudo /etc/init.d/networking restart

原文地址:https://www.cnblogs.com/zgz345/p/2616569.html