Insert a route into the kernel routing table.

Section: Interfaces Routing and Addresses

Add static route

bash
bash
sudo ip route add 10.20.0.0/16 via 192.168.50.1
Explanation

Useful for lab environments and temporary routing changes.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Interfaces Routing and Addresses
Show route used for destination
Display which route and source address would be used.
OpenIn sheetbashsame section
Show brief interface summary
List interfaces with addresses concisely.
OpenIn sheetbashsame section
Bring interface up
Enable a network interface.
OpenIn sheetbashsame section
Add IP address to interface
Assign an address to an interface.
OpenIn sheetbashsame section
Show neighbor cache
Inspect ARP/ND neighbor entries.
OpenIn sheetbashsame section
Capture traffic on interface
Capture packets on a specific interface.
OpenIn sheetbash1 tag match