Linux取IP

[root@supermaster ~]# /sbin/ifconfig eth0 | grep 'inet addr' | sed 's/^.*addr://g'|cut -d" " -f1
192.168.131.94

原文地址:https://www.cnblogs.com/lubing666666/p/4447600.html