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.

LinuxroutinggatewaytroubleshootingipLow risk
Run `ip route show` to print the kernel routing table, where the line starting with `default via` shows the current default gateway.

01Command

Command
$ ip route show

02What 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

RiskLow risk
RequirementsShips with iproute2, installed on virtually all modern distros

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • ip(8) — Linux manual page
    man7.org · technical · 2026-09-17
    Evidence: Documents the `ip route show` subcommand that prints the kernel routing table

Last verified: 2026-09-17 · Category: Network

06Related solutions