Skip to content

Instantly share code, notes, and snippets.

@natemcmaster
Last active December 20, 2015 17:19
Show Gist options
  • Save natemcmaster/6167900 to your computer and use it in GitHub Desktop.
Save natemcmaster/6167900 to your computer and use it in GitHub Desktop.
Bash command for getting the local machine ip address from ipconfig
ipconfig | grep 'IPv4' | awk -F ': ' '{print $2}'
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