Created
April 8, 2015 19:37
-
-
Save emilstahl/a4a7606364c968f123ee to your computer and use it in GitHub Desktop.
terminal ips
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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