Network

The route command

Shows the routing table: where traffic leaves for each network and what the gateway is.

Syntax

route [-n]

Most useful options

-nShows IPs without resolving names

Copy-ready examples

$ route -nNumeric routing table

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • It is deprecated: on modern systems ip route is preferred.

Related commands

FAQ

What is the gateway?

The router your traffic leaves through to the internet (the 'default' row).

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course