...
sudo vi /etc/network/interfaces
123456
auto eth0iface eth0 inet staticaddress 192.168.8.100 netmask 255.255.255.0gateway 192.168.8.2dns-nameserver 114.114.114.114
重启网络:sudo /etc/init.d/networking restart
sudo /etc/init.d/networking restart