Skip to content

Instantly share code, notes, and snippets.

@jonathan-kosgei
Created February 25, 2017 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathan-kosgei/3e01375076e3c3ad9bf90bab6c2ff47f to your computer and use it in GitHub Desktop.
Save jonathan-kosgei/3e01375076e3c3ad9bf90bab6c2ff47f to your computer and use it in GitHub Desktop.
Command to get internal ip programmatically
# From this askubuntu question http://askubuntu.com/a/604691/280044
ip route get 8.8.8.8 | awk '{print $NF; exit}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment