how can I find the default gateway of an ubuntu box
|
feedback
|
|
Classic answer
Look for a line that says something like:
The second column contains the default gateway, and the last column is the interface. You can also use the ip command:
which will give you something like
| |||||||
feedback
|
|
You can also use "netstat -nr" (I usually leave the n in the flags, so as to not have to wait for host resolution if there's a DNS issue). | |||
|
feedback
|
You can also check /etc/network/interfaces to see what it'll be on next reboot or networking restart. | |||
|
feedback
|