Created
February 18, 2015 05:35
-
-
Save Aeramor/b3695d065ca25f7c0299 to your computer and use it in GitHub Desktop.
OSX Terminal Get IP
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
/sbin/ifconfig en0 | grep 'inet ' | cut -d: -f2 | awk '{ print $2}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to set it as an alias:
alias my_ip='/sbin/ifconfig en0 | grep '''inet ''' | cut -d: -f2 | awk '''{ print $2 }''''