Created
June 20, 2013 02:04
-
-
Save warrickcustomhomes/5819790 to your computer and use it in GitHub Desktop.
Get default route on Ubuntu
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
# this works... | |
route -n | grep ^0.0.0.0 | tr -s ' ' | cut -d ' ' -f2 | |
# and so does this... | |
ip route | grep ^default | cut -d ' ' -f3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment