get IPs via CLI
Linux
IPv4
ip addr show eth0 | grep inet | grep eth0 | awk '{ print $2 }' | sed -r 's/\/24//g'
Darwin / MacOS
IPv4
ifconfig en0 inet | grep inet | awk '{ print $2 }'
IPv6
ifconfig en0 inet6 | grep inet | awk '{ print $2 }'
Written by Philipp Haußleiter
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Cli
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#