Skip to content

Instantly share code, notes, and snippets.

@r-pufky
Created November 23, 2018 21:39
Show Gist options
  • Save r-pufky/0d574a408f83e1843539b48e198e3862 to your computer and use it in GitHub Desktop.
Save r-pufky/0d574a408f83e1843539b48e198e3862 to your computer and use it in GitHub Desktop.
Return default route adapter interface.
ip -o route get to 8.8.8.8 | sed -n 's/.*src \([0-9.]\+\).*/\1/p'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment