mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-12 15:47:47 +00:00
Update cheatsheets
This commit is contained in:
12
tldr/linux/avahi-resolve-address
Normal file
12
tldr/linux/avahi-resolve-address
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# avahi-resolve-address
|
||||
|
||||
> This command is an alias of `avahi-resolve --address`.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
`tldr avahi-resolve`
|
||||
12
tldr/linux/avahi-resolve-host-name
Normal file
12
tldr/linux/avahi-resolve-host-name
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# avahi-resolve-host-name
|
||||
|
||||
> This command is an alias of `avahi-resolve --name`.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
`tldr avahi-resolve`
|
||||
@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display the default device:
|
||||
|
||||
`eject -d`
|
||||
`eject {{[-d|--default]}}`
|
||||
|
||||
- Eject the default device:
|
||||
|
||||
@@ -22,16 +22,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Toggle whether a device's tray is open or closed:
|
||||
|
||||
`eject -T {{/dev/cdrom}}`
|
||||
`eject {{[-T|--traytoggle]}} {{/dev/cdrom}}`
|
||||
|
||||
- Eject a cd drive:
|
||||
|
||||
`eject -r {{/dev/cdrom}}`
|
||||
`eject {{[-r|--cdrom]}} {{/dev/cdrom}}`
|
||||
|
||||
- Eject a floppy drive:
|
||||
|
||||
`eject -f {{/mnt/floppy}}`
|
||||
`eject {{[-f|--floppy]}} {{/mnt/floppy}}`
|
||||
|
||||
- Eject a tape drive:
|
||||
|
||||
`eject -q {{/mnt/tape}}`
|
||||
`eject {{[-q|--tape]}} {{/mnt/tape}}`
|
||||
|
||||
- Set whether the physical eject button is [i]gnored (`on` prevents ejecting):
|
||||
|
||||
`eject {{[-i|--manualeject]}} {{on|off}}`
|
||||
|
||||
@@ -38,4 +38,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display a specific routing table:
|
||||
|
||||
`ip {{[r|route]}} {{[s|show]}} {{[t|table]}} {{table_number}}`
|
||||
`ip {{[r|route]}} {{[l|list]}} {{[t|table]}} {{table_number}}`
|
||||
|
||||
25
tldr/linux/ip-route-add
Normal file
25
tldr/linux/ip-route-add
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# ip route
|
||||
|
||||
> Add a new networking route.
|
||||
> More information: <https://manned.org/ip-route>.
|
||||
|
||||
- Add a default route using gateway forwarding:
|
||||
|
||||
`sudo ip {{[r|route]}} {{[a|add]}} default via {{gateway_ip}}`
|
||||
|
||||
- Add a default route using `eth0`:
|
||||
|
||||
`sudo ip {{[r|route]}} {{[a|add]}} default dev {{eth0}}`
|
||||
|
||||
- Add a static route:
|
||||
|
||||
`sudo ip {{[r|route]}} {{[a|add]}} {{destination_ip}} via {{gateway_ip}} dev {{eth0}}`
|
||||
|
||||
- Add a route to a specific routing table:
|
||||
|
||||
`sudo ip {{[r|route]}} {{[a|add]}} {{destination_ip}} dev {{eth0}} {{[t|table]}} {{ip}}`
|
||||
@@ -5,8 +5,37 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# ip route list
|
||||
|
||||
> This command is an alias of `ip route show`.
|
||||
> Display subcommand for IP Routing table management.
|
||||
> More information: <https://manned.org/ip-route>.
|
||||
|
||||
- View documentation for the original command:
|
||||
- Display the `main` routing table:
|
||||
|
||||
`tldr ip route show`
|
||||
`ip {{[r|route]}} {{[l|list]}}`
|
||||
|
||||
- Display the main routing table (same as first example):
|
||||
|
||||
`ip {{[r|route]}} {{[l|list]}} {{[t|table]}} {{main|254}}`
|
||||
|
||||
- Display the local routing table:
|
||||
|
||||
`ip {{[r|route]}} {{[l|list]}} {{[t|table]}} {{local|255}}`
|
||||
|
||||
- Display all routing tables:
|
||||
|
||||
`ip {{[r|route]}} {{[l|list]}} {{[t|table]}} {{all|unspec|0}}`
|
||||
|
||||
- List routes from a given device only:
|
||||
|
||||
`ip {{[r|route]}} {{[l|list]}} dev {{eth0}}`
|
||||
|
||||
- List routes within a given scope:
|
||||
|
||||
`ip {{[r|route]}} {{[l|list]}} {{[s|scope]}} link`
|
||||
|
||||
- Display the routing cache:
|
||||
|
||||
`ip {{[r|route]}} {{[l|list]}} {{[c|cache]}}`
|
||||
|
||||
- Display only IPv6 or IPv4 routes:
|
||||
|
||||
`ip {{-6|-4}} {{[r|route]}}`
|
||||
|
||||
@@ -5,37 +5,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# ip route show
|
||||
|
||||
> Display subcommand for IP Routing table management.
|
||||
> More information: <https://manned.org/ip-route>.
|
||||
> This command is an alias of `ip route list`.
|
||||
|
||||
- Display the `main` routing table:
|
||||
- View documentation for the original command:
|
||||
|
||||
`ip {{[r|route]}} {{[s|show]}}`
|
||||
|
||||
- Display the main routing table (same as first example):
|
||||
|
||||
`ip {{[r|route]}} {{[s|show]}} {{[t|table]}} {{main|254}}`
|
||||
|
||||
- Display the local routing table:
|
||||
|
||||
`ip {{[r|route]}} {{[s|show]}} {{[t|table]}} {{local|255}}`
|
||||
|
||||
- Display all routing tables:
|
||||
|
||||
`ip {{[r|route]}} {{[s|show]}} {{[t|table]}} {{all|unspec|0}}`
|
||||
|
||||
- List routes from a given device only:
|
||||
|
||||
`ip {{[r|route]}} {{[s|show]}} dev {{eth0}}`
|
||||
|
||||
- List routes within a given scope:
|
||||
|
||||
`ip {{[r|route]}} {{[s|show]}} {{[s|scope]}} link`
|
||||
|
||||
- Display the routing cache:
|
||||
|
||||
`ip {{[r|route]}} {{[s|show]}} {{[c|cache]}}`
|
||||
|
||||
- Display only IPv6 or IPv4 routes:
|
||||
|
||||
`ip {{-6|-4}} {{[r|route]}} {{[s|show]}}`
|
||||
`tldr ip route list`
|
||||
|
||||
@@ -12,6 +12,10 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`ip {{[ru|rule]}}`
|
||||
|
||||
- Create a new generic routing rule with a higher priority than `main`:
|
||||
|
||||
`sudo ip {{[ru|rule]}} {{[a|add]}} from all lookup {{100}}`
|
||||
|
||||
- Add a new rule based on packet source addresses:
|
||||
|
||||
`sudo ip {{[ru|rule]}} {{[a|add]}} from {{192.168.178.2/32}}`
|
||||
@@ -24,11 +28,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo ip {{[ru|rule]}} {{[d|delete]}} from {{192.168.178.2/32}}`
|
||||
|
||||
- Delete a rule based on packet destination addresses:
|
||||
|
||||
`sudo ip {{[ru|rule]}} {{[d|delete]}} to {{192.168.178.2/32}}`
|
||||
|
||||
- Flush all deleted rules:
|
||||
- Remove all routing rules:
|
||||
|
||||
`sudo ip {{[ru|rule]}} {{[f|flush]}}`
|
||||
|
||||
|
||||
21
tldr/linux/lldpctl
Normal file
21
tldr/linux/lldpctl
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# lldpctl
|
||||
|
||||
> Print link layer discovery protocol information.
|
||||
> More information: <https://manned.org/man/lldpctl>.
|
||||
|
||||
- Start the lldp daemon:
|
||||
|
||||
`systemctl start lldpd`
|
||||
|
||||
- Display collected neighbor data:
|
||||
|
||||
`sudo lldpctl`
|
||||
|
||||
- Display help:
|
||||
|
||||
`lldpctl {{[-h|--help]}}`
|
||||
Reference in New Issue
Block a user