mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-11 12:47:23 +00:00
Update cheatsheets
This commit is contained in:
37
tldr/linux/grub-probe
Normal file
37
tldr/linux/grub-probe
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# grub-probe
|
||||
|
||||
> Probe device information for a particular path or device.
|
||||
> More information: <https://www.gnu.org/software/grub/manual/grub/html_node/Invoking-grub_002dprobe.html>.
|
||||
|
||||
- Get GRUB filesystem module for a path:
|
||||
|
||||
`sudo grub-probe {{[-t|--target]}} fs {{/boot/grub}}`
|
||||
|
||||
- Get the system device containing a path:
|
||||
|
||||
`sudo grub-probe {{[-t|--target]}} device {{/boot/grub}}`
|
||||
|
||||
- Get GRUB disk name for a system device:
|
||||
|
||||
`sudo grub-probe {{[-t|--target]}} drive {{/dev/sdX}} {{[-d|--device]}}`
|
||||
|
||||
- Get filesystem UUID:
|
||||
|
||||
`sudo grub-probe {{[-t|--target]}} fs_uuid {{/boot/grub}}`
|
||||
|
||||
- Get filesystem label:
|
||||
|
||||
`sudo grub-probe {{[-t|--target]}} fs_label {{/boot/grub}}`
|
||||
|
||||
- Get MBR partition type code(two hexadecimal digits):
|
||||
|
||||
`sudo grub-probe {{[-t|--target]}} msdos_parttype {{/dev/sdX}}`
|
||||
|
||||
- Probe using a custom device map:
|
||||
|
||||
`sudo grub-probe {{[-t|--target]}} drive {{/boot/grub}} {{[-m|--device-map]}} {{path/to/custom_device.map}}`
|
||||
25
tldr/linux/installpkg
Normal file
25
tldr/linux/installpkg
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# installpkg
|
||||
|
||||
> Install a Slackware package.
|
||||
> More information: <http://www.slackware.com/config/packages.php>.
|
||||
|
||||
- Install a package:
|
||||
|
||||
`sudo installpkg {{path/to/package.tgz}}`
|
||||
|
||||
- Generate a report of a simulated installation to `stdout`:
|
||||
|
||||
`installpkg -warn {{path/to/package.tgz}}`
|
||||
|
||||
- Create a package from current directory and its subdirectories:
|
||||
|
||||
`installpkg -m {{package_name.tgz}}`
|
||||
|
||||
- Install the contents of the current directory and subdirectories as a package with a specified name:
|
||||
|
||||
`sudo installpkg -r {{package_name.tgz}}`
|
||||
25
tldr/linux/ip-netconf
Normal file
25
tldr/linux/ip-netconf
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# ip netconf
|
||||
|
||||
> Display configuration parameters.
|
||||
> More information: <https://manned.org/ip-netconf>.
|
||||
|
||||
- Show network configuration for all interfaces:
|
||||
|
||||
`ip {{[netc|netconf]}}`
|
||||
|
||||
- Show network configuration for a specific interface:
|
||||
|
||||
`ip {{[netc|netconf]}} {{[s|show]}} dev {{network_interface}}`
|
||||
|
||||
- Show only IPv4 network configuration:
|
||||
|
||||
`ip -4 {{[netc|netconf]}}`
|
||||
|
||||
- Show only IPv6 network configuration:
|
||||
|
||||
`ip -6 {{[netc|netconf]}}`
|
||||
33
tldr/linux/ip-tuntap
Normal file
33
tldr/linux/ip-tuntap
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# ip tuntap
|
||||
|
||||
> Manage TUN/TAP virtual network interfaces.
|
||||
> More information: <https://baturin.org/docs/iproute2/#ip-tuntap>.
|
||||
|
||||
- Show all existing TUN/TAP devices:
|
||||
|
||||
`ip {{[tunt|tuntap]}}`
|
||||
|
||||
- Create a TUN device with a specific name:
|
||||
|
||||
`sudo ip {{[tunt|tuntap]}} {{[a|add]}} {{[d|dev]}} {{tun0}} {{[m|mode]}} {{[t|tun]}}`
|
||||
|
||||
- Create a TAP device with a specific name:
|
||||
|
||||
`sudo ip {{[tunt|tuntap]}} {{[a|add]}} {{[d|dev]}} {{tap0}} {{[m|mode]}} {{[ta|tap]}}`
|
||||
|
||||
- Delete a TUN or TAP device:
|
||||
|
||||
`sudo ip {{[tunt|tuntap]}} {{[d|delete]}} {{[d|dev]}} {{tun0|tap0}} {{[m|mode]}} {{tun|tap}}`
|
||||
|
||||
- Set the owner (UID) of a TUN/TAP device:
|
||||
|
||||
`sudo ip {{[tunt|tuntap]}} {{[a|add]}} {{[d|dev]}} {{tun0|tap0}} {{[m|mode]}} {{tun|tap}} {{[u|user]}} {{username}}`
|
||||
|
||||
- Set both owner (UID) and group (GID) for a TUN/TAP device:
|
||||
|
||||
`sudo ip {{[tunt|tuntap]}} {{[a|add]}} {{[d|dev]}} {{tun0|tap0}} {{[m|mode]}} {{tun|tap}} {{[u|user]}} {{username}} {{[g|group]}} {{group_name}}`
|
||||
29
tldr/linux/removepkg
Normal file
29
tldr/linux/removepkg
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# removepkg
|
||||
|
||||
> Remove a specified Slackware package.
|
||||
> More information: <http://www.slackware.com/config/packages.php>.
|
||||
|
||||
- Remove a package:
|
||||
|
||||
`sudo removepkg {{package_name}}`
|
||||
|
||||
- Generate a report of a simulated removal to `stdout`:
|
||||
|
||||
`removepkg -warn {{package_name}}`
|
||||
|
||||
- Reconstruct the package subtree in `/tmp/preserved_packages/package_name` and remove the package:
|
||||
|
||||
`sudo removepkg -preserve {{package_name}}`
|
||||
|
||||
- Copy package under `/tmp/preserved_packages/package_name` without removing:
|
||||
|
||||
`removepkg -copy {{package_name}}`
|
||||
|
||||
- Save temporary files created by `removepkg` for debugging:
|
||||
|
||||
`sudo removepkg -keep {{package_name}}`
|
||||
34
tldr/linux/systemctl-list-dependencies
Normal file
34
tldr/linux/systemctl-list-dependencies
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# systemctl list-dependencies
|
||||
|
||||
> Show a unit's dependency tree in systemd.
|
||||
> See also: `systemctl list-units` to list loaded units.
|
||||
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#%0A%20%20%20%20%20%20%20%20%20%20%20%20list-dependencies%0A%20%20%20%20%20%20%20%20%20%20%20%20UNIT...%0A%20%20%20%20%20%20%20%20%20%20>.
|
||||
|
||||
- Show the dependency tree of `default.target`:
|
||||
|
||||
`systemctl list-dependencies`
|
||||
|
||||
- Show the dependency tree of a specific unit:
|
||||
|
||||
`systemctl list-dependencies {{unit}}`
|
||||
|
||||
- Include all dependency types (not only `Requires=` and `Wants=`):
|
||||
|
||||
`systemctl list-dependencies {{unit}} {{[-a|--all]}}`
|
||||
|
||||
- Limit the tree to a specific unit type:
|
||||
|
||||
`systemctl list-dependencies {{unit}} {{[-t|--type]}} {{service|socket|target|mount|...}}`
|
||||
|
||||
- Reverse the direction to show units that depend on the specified unit:
|
||||
|
||||
`systemctl list-dependencies {{unit}} --reverse`
|
||||
|
||||
- Print output without headers or footers (for scripts):
|
||||
|
||||
`systemctl list-dependencies {{unit}} --no-legend`
|
||||
@@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- List one VG metadata backup file:
|
||||
|
||||
`vgcfgrestore {{[-l|--list ]}} {{[ -f|--file]}} {{path/to/file}} {{vg_name}}`
|
||||
`vgcfgrestore {{[-l|--list]}} {{[-f|--file]}} {{path/to/file}} {{vg_name}}`
|
||||
|
||||
Reference in New Issue
Block a user