e Learning

Display Routing Table with netstat -nr in Linux

More often we use netstat command to list open ports on a Linux system. But not only that, we can use netstat command to display routing table by combining with -nr options. To View the routing table type

netstat -nr

-n – Show numerical addresses instead of hostname
-r – Display the kernel routing tables

netstat -nr routing table in linux

The output of the netstat -nr in Linux very identical to route -n command, which can also use to display the routing table.