linux查看外网ip

方法一:
curl http://members.3322.org/dyndns/getip

方法二:
curl -s http://whatismyip.org

方法三:
1, cd  /etc/sysconfig/network-scripts/    进入存放网卡信息的文件夹下
2,ls  ls ifcfg-eth*    看显示有几个网卡
3,cat  ifcfg-eth0从上面ls  找出来的结果查看网卡配置信息!!

猜你喜欢

转载自huxc.iteye.com/blog/2261047