进入修改配置文件命令
sudo vi /etc/network/interfaces
在文件中添加以下内容
auto eth0
iface eth0 inet static #iface是interface(接口)的缩写
address 192.168.0.33
netmask 255.255.255.0
gateway 192.168.0.1
broadcast 192.168.0.255
dns-nameservers 8.8.8.8
重启网络:
sudo service network-manager restart
sudo /etc/init.d/networking restart
sudo reboot