在Linux Ubuntu上查看和修改IP
看IP。
ifconfig -a
eth0link encap :以太网hwaddr 08336003360273360 a 833600033608 c
inetaddr 336010.0.2.15 bcast :10.0.2.255 mask :255.255.255.255.255.255.0
inet6addr : Fe 8033603360 a 00:27 ff : FEA 833608 c/64 scope : link
upbroadcastrunningmulticastmtu :1500公制:1
collisions :0 txqueuelen :1000
lo Link encap:魅力之翼/p inetaddr 3360127.0.0.1 mask 3360255.0.0.0
inet6addr 3360336033601/128 scope : host
uploopbackrunningmtu :65536公制:1
collisions :0 txqueuelen :0
修改IP。
a,在根用户下使用ifconfig命令
ifconfig eth0 192.168.87.223
b,在根用户下修改文件/etc/sys sconfig/network-scripts/if CFG-eth 0。
gedit/etc/sys config/network-script/if CFG-eth 0