ip route
IP Routing table management subcommand. See also:
routel,ip rule. More information: https://manned.org/ip-route.
- Display the
mainrouting table:
ip
- Add a default route using gateway forwarding:
sudo ip default via
- Add a default route using
ethX:
sudo ip default dev
- Add a static route:
sudo ip via dev
- Delete a static route:
sudo ip dev
- Change or replace a static route:
sudo ip via dev
- Show which route will be used by the kernel to reach an IP address:
ip
- Display a specific routing table:
ip
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
