View the routing table and default gateway with `ip route show`
The routing table is the first thing to check when traffic leaves the wrong interface or the gateway seems dead — and `ip route show` is the quick, modern way to read it.
01Command
$ ip route show02What it does
Every packet follows the kernel routing table, so checking it is step one for 'why can't I reach X' problems. The `default via <ip> dev <iface>` entry is your gateway and outgoing interface; further lines show the networks reachable directly on each link. Add `get <ip>` (e.g. `ip route get 1.1.1.1`) to see exactly which route a given destination would take.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- ip(8) — Linux manual pageEvidence: Documents the `ip route show` subcommand that prints the kernel routing table
Last verified: 2026-09-17 · Category: Network
06Related solutions
One command that prints every interface with its state and IPv4/IPv6 addresses in a short table — the modern, memorable replacement for digging through `ifconfig` or the verbose `ip addr` output.
The fastest way to answer 'is the firewall blocking me?' — netcat in scan mode attempts one TCP connection and prints whether it succeeded.
The classic forgotten-syntax command: `traceroute` shows every router between you and a destination plus the round-trip time of probes to each hop.