Show which route and source address will be used.

Section: Routes and Gateways

Resolve route for destination

bash
bash
ip route get 8.8.8.8
Explanation

Show which route and source address will be used.

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 Routes and Gateways
Show routes
Display the main routing table.
OpenIn sheetbashsame section
Add default route
Set a default gateway.
OpenIn sheetbashsame section
Delete default route
Remove the default gateway.
OpenIn sheetbashsame section
Add static route
Add a route for a remote network.
OpenIn sheetbashsame section
Delete static route
Remove a static route.
OpenIn sheetbashsame section
Add route to custom table
Insert a route into an alternate routing table.
OpenIn sheetbashsame section