/sbin/ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}' | head -n 1
转载于:https://www.cnblogs.com/hubo2/archive/2013/01/30/2883484.html
/sbin/ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}' | head -n 1
转载于:https://www.cnblogs.com/hubo2/archive/2013/01/30/2883484.html