1.查看网卡名称
iwconfig
2.切换到root
su root
3.修改配置文件
vi /etc/network/interfaces
修改为:
auto eth0 iface eth0 inet static address 192.168.8.100 netmask 255.255.255.0 gateway 192.168.8.2 dns-nameserver 119.29.29.29
4.重启网络
sudo /etc/init.d/networking restart
iwconfig
su root
vi /etc/network/interfaces
修改为:
auto eth0 iface eth0 inet static address 192.168.8.100 netmask 255.255.255.0 gateway 192.168.8.2 dns-nameserver 119.29.29.29
sudo /etc/init.d/networking restart