Update cheatsheets

This commit is contained in:
ivuorinen
2025-06-25 00:20:50 +00:00
parent 9b28211252
commit f4e4b40a39
35 changed files with 147 additions and 70 deletions

View File

@@ -16,21 +16,21 @@ source: https://github.com/tldr-pages/tldr.git
`sudo ip {{[r|route]}} {{[a|add]}} default via {{gateway_ip}}`
- Add a default route using `eth0`:
- Add a default route using `ethX`:
`sudo ip {{[r|route]}} {{[a|add]}} default dev {{eth0}}`
`sudo ip {{[r|route]}} {{[a|add]}} default dev {{ethX}}`
- Add a static route:
`sudo ip {{[r|route]}} {{[a|add]}} {{destination_ip}} via {{gateway_ip}} dev {{eth0}}`
`sudo ip {{[r|route]}} {{[a|add]}} {{destination_ip}} via {{gateway_ip}} dev {{ethX}}`
- Delete a static route:
`sudo ip {{[r|route]}} {{[d|delete]}} {{destination_ip}} dev {{eth0}}`
`sudo ip {{[r|route]}} {{[d|delete]}} {{destination_ip}} dev {{ethX}}`
- Change or replace a static route:
`sudo ip {{[r|route]}} {{change|replace}} {{destination_ip}} via {{gateway_ip}} dev {{eth0}}`
`sudo ip {{[r|route]}} {{change|replace}} {{destination_ip}} via {{gateway_ip}} dev {{ethX}}`
- Show which route will be used by the kernel to reach an IP address: