Skip to content

Instantly share code, notes, and snippets.

@urjitbhatia
Created May 4, 2018 22:33
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 urjitbhatia/5694ee8379d1f3015e9617345ab762fa to your computer and use it in GitHub Desktop.
Save urjitbhatia/5694ee8379d1f3015e9617345ab762fa to your computer and use it in GitHub Desktop.
Get the current external facing interface ip
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