Last active
December 20, 2015 17:19
-
-
Save natemcmaster/6167900 to your computer and use it in GitHub Desktop.
Bash command for getting the local machine ip address from ipconfig
This file contains hidden or 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
ipconfig | grep 'IPv4' | awk -F ': ' '{print $2}' |
This file contains hidden or 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
ifconfig | grep -A 6 '^en0' | grep 'inet ' | awk -F ' ' '{print $2}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment