天天看点

获取网卡IP地址命令

centos 7

ifconfig ens32|grep "inet"|awk -F ' ' 'NR==1{print $2}'

centos6

 ifconfig eth0|awk -F '[: ]+' 'NR==2{print $4 }'  

本文转自  一招拜师  51CTO博客,原文链接:http://blog.51cto.com/sadoc/1921705

继续阅读