We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5368015 commit 0480e7dCopy full SHA for 0480e7d
1 file changed
.aliases
@@ -57,7 +57,7 @@ alias canary='/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Ch
57
58
# IP addresses
59
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
60
-alias localip="ipconfig getifaddr en0"
+alias localip="echo $(ifconfig -a | grep -E 'UP|inet[^6]' | grep -A1 UP | grep inet | grep -v 127 | tail -1 | awk '{print $2}')"
61
alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'"
62
63
# Show active network interfaces
0 commit comments