要修改linux ubuntu的IP配置:
该程序位于: /etc/network/interfaces
vim /etc/network/interfaces
1 # The primary network interface
2 auto eth0
3 iface eth0 inet static
4 address 192.168.1.4
5 netmask 255.255.255.0
6 network 192.168.1.0
7 broadcast 192.168.0.255
8 gateway 192.168.1.1
9
10
修改后,保存,然后重启网络 sudo /etc/init.d/networking restart
然后 sudo ifdowm eth0
然后 sudo ifup eth0