ip route

Manage and display the kernel routing table.

high risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
Safer / dry-run alternatives
ip route show > /root/routes.backupSave the routing table.
ip route get <dest>See which route is used.
What it does

ip route manages the kernel IP routing table. Used for adding static routes, debugging routing decisions, and configuring policy-based routing. Changes are temporary (lost on reboot) unless written to network config files.

Examples
ip route showDisplay the full routing table · explain & risk-check →
ip route get 8.8.8.8Show which route/interface reaches a destination · explain & risk-check →
ip route add 10.10.0.0/16 via 192.168.1.1Add static route · explain & risk-check →
ip route del 10.10.0.0/16Remove a static route · explain & risk-check →
ip route add default via 192.168.1.1Set default gateway · explain & risk-check →
Pro tip

Use `ip route get <dest>` to instantly verify which gateway will be used for any destination — the most reliable way to debug routing issues without reading the full routing table.

Related
ip traceroute ping
Open the full explainer →More in Networking

Reference text is hand-written and may be incomplete — check man ip for your version. Test destructive commands on a non-production system first.