ifconfig | grep -v '127.0.0.1' | awk '/inet (addr:)?/{sub("addr:","");print $2;exit}'
需要拿多个IP的话,把exit去掉即可。
Google Sitemap