ifconfig br0 | grep 'inet addr' | sed 's/^.*addr://g' |sed 's/ Bcast:.*$//g' 注意:br0为网卡名称,需要改成你使用的网卡名称 相关文章: