How do I find out which gateway a Linux system is currently using?


route -nee

The output will look like this:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface    MSS   Window irtt   U     0      0        0 eth0     0     0      0         UG    0      0        0 eth0     0     0      0         UG    0      0        0 eth0     0     0      0

This means that the system with the IP address is using as gateway.

Share this page:

Suggested articles

5 Comment(s)

Add comment


By: tdi

It also possible to use great iproute2 package: the command to show the current routing tables is : ip route show dev eth1  scope link dev lo scope link
default via dev eth1

By: Anonymous


 This command is not working on my Desktop which have CentOS installed on it.



By: gaurav

how to find the defalt gateway of any other machine.

By: sodase mohamed

How do you find a sytem because I got a computer and when I turned it on it said system not found?

What do I do?

By: prashant

route -n