Update cheatsheets

This commit is contained in:
ivuorinen
2025-03-08 00:14:59 +00:00
parent a812b3c467
commit f8bee5305f
111 changed files with 540 additions and 310 deletions

View File

@@ -10,28 +10,28 @@ source: https://github.com/tldr-pages/tldr.git
- Display the routing table:
`ip route {{show|list}}`
`ip {{[r|route]}} {{show|list}}`
- Add a default route using gateway forwarding:
`sudo ip route add default via {{gateway_ip}}`
`sudo ip {{[r|route]}} add default via {{gateway_ip}}`
- Add a default route using `eth0`:
`sudo ip route add default dev {{eth0}}`
`sudo ip {{[r|route]}} add default dev {{eth0}}`
- Add a static route:
`sudo ip route add {{destination_ip}} via {{gateway_ip}} dev {{eth0}}`
`sudo ip {{[r|route]}} add {{destination_ip}} via {{gateway_ip}} dev {{eth0}}`
- Delete a static route:
`sudo ip route del {{destination_ip}} dev {{eth0}}`
`sudo ip {{[r|route]}} del {{destination_ip}} dev {{eth0}}`
- Change or replace a static route:
`sudo ip route {{change|replace}} {{destination_ip}} via {{gateway_ip}} dev {{eth0}}`
`sudo ip {{[r|route]}} {{change|replace}} {{destination_ip}} via {{gateway_ip}} dev {{eth0}}`
- Show which route will be used by the kernel to reach an IP address:
`ip route get {{destination_ip}}`
`ip {{[r|route]}} get {{destination_ip}}`