How can I get the routing tables in command line? On a normal unix machine I can use

[user@server ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    0      0        0 enp5s0       U     0      0        0 enp5s0     U     1002   0        0 enp5s0

On my macbook, this does not work

[user@macbook ~]# > route -n
usage: route [-dnqtv] command [[modifiers] args]

What be the equivilent command?



netstat -r

Note that this will resolve the names of the gateways if possible. This takes some time. If you don't need this, run

netstat -rn
| improve this answer | |

Not the answer you're looking for? Browse other questions tagged .