首先设置IP
sudo gedit /etc/network/interface
将其内容删除
加上一下内容
auto lo
iface lo inet loopback
auto etho
iface etho inet static
address 192.168.0.168
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
保存
然后修改DNS
sudo gedit /etc/resolv.conf
将内容修改为
nameserver 202.103.24.68
保存
重启网络连接
sudo /etc/init.d/networking stop
sudo /etc/init.d/networking start