1、设置Ip
sudo ifconfig eth0 IP
2、设置子网
sudo ifconfig eth0 netmask 子网3、设置网关sudo route add default gw 网关
4、同时设置IP和子网
sudo ifconfig eth0 IP netmask 子网