Skip to content

Instantly share code, notes, and snippets.

@emilstahl
Created April 8, 2015 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emilstahl/a4a7606364c968f123ee to your computer and use it in GitHub Desktop.
Save emilstahl/a4a7606364c968f123ee to your computer and use it in GitHub Desktop.
terminal ips
# IP addresses
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias localip="ipconfig getifaddr en0"
alias ips="ifconfig -a | grep -o 'inet6\? \(\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)\|[a-fA-F0-9:]\+\)' | sed -e 's/inet6* //'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment