How to find the default gateway on Linux

by lifeLinux on May 2, 2011

Whether you are troubleshooting network problems or trying to set up a VPN…, knowing what address your computer has configured as the default gateway is always useful. Running a simple command from the terminal can give you this.

root@lifelinux:~# route -n

Sample outputs:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface UH    0      0        0 ppp0     U     1000   0        0 ppp0         UG    0      0        0 ppp0 is the address for my default gateway.

Leave a Comment

Previous post:

Next post: