Skip to content

Instantly share code, notes, and snippets.

@joyrexus
Created July 11, 2013 16:10
Show Gist options
  • Save joyrexus/5976828 to your computer and use it in GitHub Desktop.
Save joyrexus/5976828 to your computer and use it in GitHub Desktop.
Two commands to print your active IP address.
ipconfig getifaddr en0 # or en1 for wireless
ifconfig | grep "inet " | grep -v "127.0" | cut -d' ' -f 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment