Update cheatsheets

This commit is contained in:
ivuorinen
2025-11-16 00:22:19 +00:00
parent cb2b02c321
commit a3dc1769f5
31 changed files with 139 additions and 93 deletions

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
---
# cli53
> Command line tool for Amazon Route 53.
> Tool for Amazon Route 53.
> More information: <https://github.com/barnybug/cli53>.
- List domains:

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
---
# clip-view
> Command Line Interface Pages render.
> Command Line Interface Pages (CLIP) render.
> Render for a TlDr-like project with much a more extensive syntax and several render modes.
> More information: <https://github.com/command-line-interface-pages/v2-tooling/tree/main/clip-view>.

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
---
# laydown
> Command line application to prepare for Daily Standup.
> Prepare for Daily Standup.
> More information: <https://github.com/badjr13/laydown>.
- Add an item to DID section:

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
---
# cmus
> Command-line Music Player.
> Command-line music player.
> Use `<ArrowKeys>` to navigate, `<Enter>` to select, and numbers `<1>`-`<8>` switch between different views.
> See also: `ncmpcpp`, `clementine`, `qmmp`.
> More information: <https://manned.org/cmus>.

View File

@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
- Generate locales:
`locale-gen`
`sudo locale-gen`
- Do not delete undefined locales:
`locale-gen --keep-existing`
`sudo locale-gen --keep-existing`

View File

@@ -10,24 +10,24 @@ source: https://github.com/tldr-pages/tldr.git
- Activate a logical volume:
`lvchange {{[-a|--activate]}} y {{/dev/vg_name/lv_name}}`
`sudo lvchange {{[-a|--activate]}} y {{/dev/vg_name/lv_name}}`
- Deactivate a logical volume:
`lvchange {{[-a|--activate]}} n {{/dev/vg_name/lv_name}}`
`sudo lvchange {{[-a|--activate]}} n {{/dev/vg_name/lv_name}}`
- Enable autoactivation for a logical volume:
`lvchange {{[-a|--activate]}} ay {{/dev/vg_name/lv_name}}`
`sudo lvchange {{[-a|--activate]}} ay {{/dev/vg_name/lv_name}}`
- Set a logical volume to read-only (use `rw` for read-write):
`lvchange {{[-p|--permission]}} r {{/dev/vg_name/lv_name}}`
`sudo lvchange {{[-p|--permission]}} r {{/dev/vg_name/lv_name}}`
- Skip activation for a logical volume:
`lvchange {{[-k|--setactivationskip]}} y {{/dev/vg_name/lv_name}}`
`sudo lvchange {{[-k|--setactivationskip]}} y {{/dev/vg_name/lv_name}}`
- Refresh a logical volume using the latest metadata:
`lvchange --refresh {{/dev/vg_name/lv_name}}`
`sudo lvchange --refresh {{/dev/vg_name/lv_name}}`

View File

@@ -10,20 +10,20 @@ source: https://github.com/tldr-pages/tldr.git
- Convert a linear logical volume to RAID1 (add one mirror: two copies total):
`lvconvert --type raid1 {{[-m|--mirrors]}} 1 {{/dev/vg_name/lv_name}}`
`sudo lvconvert --type raid1 {{[-m|--mirrors]}} 1 {{/dev/vg_name/lv_name}}`
- Remove mirroring and convert back to a linear logical volume:
`lvconvert {{[-m|--mirrors]}} 0 {{/dev/vg_name/lv_name}}`
`sudo lvconvert {{[-m|--mirrors]}} 0 {{/dev/vg_name/lv_name}}`
- Merge a snapshot back into its origin logical volume (applies on next activation):
`lvconvert --merge {{/dev/vg_name/snapshot_lv}}`
`sudo lvconvert --merge {{/dev/vg_name/snapshot_lv}}`
- Repair a degraded RAID logical volume:
`lvconvert --repair {{/dev/vg_name/lv_name}}`
`sudo lvconvert --repair {{/dev/vg_name/lv_name}}`
- Convert an existing logical volume into a thin pool with a separate metadata LV:
`lvconvert --type thin-pool --poolmetadata {{/dev/vg_name/pool_metadata_lv}} {{/dev/vg_name/pool_lv}}`
`sudo lvconvert --type thin-pool --poolmetadata {{/dev/vg_name/pool_metadata_lv}} {{/dev/vg_name/pool_lv}}`

View File

@@ -9,18 +9,18 @@ source: https://github.com/tldr-pages/tldr.git
> See also: `lvm`.
> More information: <https://manned.org/lvcreate>.
- Create a logical volume of 10 gigabytes in the volume group vg1:
- Create a logical volume of 10 gigabytes in the volume group `vg1`:
`lvcreate {{[-L|--size]}} {{10G}} {{vg1}}`
`sudo lvcreate {{[-L|--size]}} 10G vg1`
- Create a 1500 megabyte linear logical volume named mylv in the volume group vg1:
- Create a 1500 megabyte linear logical volume named `mylv` in the volume group `vg1`:
`lvcreate {{[-L|--size]}} {{1500}} {{[-n|--name]}} {{mylv}} {{vg1}}`
`sudo lvcreate {{[-L|--size]}} 1500 {{[-n|--name]}} mylv vg1`
- Create a logical volume called mylv that uses 60% of the total space in volume group vg1:
- Create a logical volume called `mylv` that uses 60% of the total space in volume group `vg1`:
`lvcreate {{[-l|--extents]}} {{60%VG}} {{[-n|--name]}} {{mylv}} {{vg1}}`
`sudo lvcreate {{[-l|--extents]}} 60%VG {{[-n|--name]}} mylv vg1`
- Create a logical volume called mylv that uses all the unallocated space in the volume group vg1:
- Create a logical volume called `mylv` that uses all the unallocated space in the volume group `vg1`:
`lvcreate {{[-l|--extents]}} {{100%FREE}} {{[-n|--name]}} {{mylv}} {{vg1}}`
`sudo lvcreate {{[-l|--extents]}} 100%FREE {{[-n|--name]}} mylv vg1`

View File

@@ -10,31 +10,31 @@ source: https://github.com/tldr-pages/tldr.git
- List devices recorded in the devices file:
`lvmdevices`
`sudo lvmdevices`
- Add a device to the devices file:
`lvmdevices --adddev {{/dev/sdXN}}`
`sudo lvmdevices --adddev {{/dev/sdXN}}`
- Remove a device from the devices file:
`lvmdevices --deldev {{/dev/sdXN}}`
`sudo lvmdevices --deldev {{/dev/sdXN}}`
- Add a physical volume by its PVID:
`lvmdevices --addpvid {{PVID}}`
`sudo lvmdevices --addpvid {{PVID}}`
- Remove a physical volume by its PVID:
`lvmdevices --delpvid {{PVID}}`
`sudo lvmdevices --delpvid {{PVID}}`
- Update the devices file after device names change:
`lvmdevices --update`
`sudo lvmdevices --update`
- Check the devices file for problems:
`lvmdevices --check`
`sudo lvmdevices --check`
- Display version:

View File

@@ -11,8 +11,8 @@ source: https://github.com/tldr-pages/tldr.git
- Reduce a volume's size to 120 GB:
`lvreduce {{[-L|--size]}} {{120G}} {{logical_volume}}`
`sudo lvreduce {{[-L|--size]}} {{120G}} {{logical_volume}}`
- Reduce a volume's size by 40 GB as well as the underlying filesystem:
`lvreduce {{[-L|--size]}} -{{40G}} {{[-r|--resizefs]}} {{logical_volume}}`
`sudo lvreduce {{[-L|--size]}} -{{40G}} {{[-r|--resizefs]}} {{logical_volume}}`

View File

@@ -11,16 +11,16 @@ source: https://github.com/tldr-pages/tldr.git
- Change the size of a logical volume to 120 GB:
`lvresize {{[-L|--size]}} 120G {{volume_group}}/{{logical_volume}}`
`sudo lvresize {{[-L|--size]}} 120G {{volume_group}}/{{logical_volume}}`
- Extend the size of a logical volume as well as the underlying filesystem by 120 GB:
`lvresize {{[-L|--size]}} +120G {{[-r|--resizefs]}} {{volume_group}}/{{logical_volume}}`
`sudo lvresize {{[-L|--size]}} +120G {{[-r|--resizefs]}} {{volume_group}}/{{logical_volume}}`
- Extend the size of a logical volume to 100% of the free physical volume space:
`lvresize {{[-l|--extents]}} 100%FREE {{volume_group}}/{{logical_volume}}`
`sudo lvresize {{[-l|--extents]}} 100%FREE {{volume_group}}/{{logical_volume}}`
- Reduce the size of a logical volume as well as the underlying filesystem by 120 GB:
`lvresize {{[-L|--size]}} -120G {{[-r|--resizefs]}} {{volume_group}}/{{logical_volume}}`
`sudo lvresize {{[-L|--size]}} -120G {{[-r|--resizefs]}} {{volume_group}}/{{logical_volume}}`

View File

@@ -11,16 +11,16 @@ source: https://github.com/tldr-pages/tldr.git
- List all logical volumes:
`lvscan`
`sudo lvscan`
- List only active logical volumes:
`lvscan --active`
`sudo lvscan --active`
- List only inactive logical volumes:
`lvscan --inactive`
`sudo lvscan --inactive`
- Display logical volumes in JSON format:
`lvscan --reportformat json`
`sudo lvscan --reportformat json`

View File

@@ -16,14 +16,18 @@ source: https://github.com/tldr-pages/tldr.git
`paclog --commandline`
- Display log events for a specific package:
`paclog --package {{package_name}}`
- Display package actions of a specific type:
`paclog --action {{install|reinstall|upgrade|downgrade|remove|all}}`
- Display only errors, warnings, and notes:
`paclog --warnings`
- Display package name and action type:
`paclog --package {{package_name}} --action {{install|upgrade|remove|...}}`
- Display the list of installed packages according to the log:
`paclog --pkglist`

View File

@@ -10,28 +10,28 @@ source: https://github.com/tldr-pages/tldr.git
- Allow allocation on a physical volume:
`pvchange {{[-x|--allocatable]}} y {{/dev/sdXN}}`
`sudo pvchange {{[-x|--allocatable]}} y {{/dev/sdXN}}`
- Disallow allocation on a physical volume:
`pvchange {{[-x|--allocatable]}} n {{/dev/sdXN}}`
`sudo pvchange {{[-x|--allocatable]}} n {{/dev/sdXN}}`
- Ignore metadata areas on a physical volume:
`pvchange --metadataignore y {{/dev/sdXN}}`
`sudo pvchange --metadataignore y {{/dev/sdXN}}`
- Stop ignoring metadata areas on a physical volume:
`pvchange --metadataignore n {{/dev/sdXN}}`
`sudo pvchange --metadataignore n {{/dev/sdXN}}`
- Add a tag to a physical volume:
`pvchange --addtag {{tag}} {{/dev/sdXN}}`
`sudo pvchange --addtag {{tag}} {{/dev/sdXN}}`
- Generate a new UUID for a physical volume (use with care):
`pvchange --uuid {{/dev/sdXN}}`
`sudo pvchange --uuid {{/dev/sdXN}}`
- Change all visible physical volumes (combine with other options such as allocatable):
`pvchange {{[-a|--all]}} {{[-x|--allocatable]}} y`
`sudo pvchange {{[-a|--all]}} {{[-x|--allocatable]}} y`

View File

@@ -10,28 +10,28 @@ source: https://github.com/tldr-pages/tldr.git
- Print LVM on-disk headers and structures (label, PV header, MDA header, metadata area):
`pvck {{/dev/sdXN}} --dump headers`
`sudo pvck {{/dev/sdXN}} --dump headers`
- Print the current VG metadata text:
`pvck {{/dev/sdXN}} --dump metadata`
`sudo pvck {{/dev/sdXN}} --dump metadata`
- List all metadata versions found in the metadata area:
`pvck {{/dev/sdXN}} --dump metadata_all`
`sudo pvck {{/dev/sdXN}} --dump metadata_all`
- Search common locations for metadata when headers may be damaged, and save it to a file:
`pvck {{/dev/sdXN}} --dump metadata_search {{[-f|--file]}} {{path/to/metadata.txt}}`
`sudo pvck {{/dev/sdXN}} --dump metadata_search {{[-f|--file]}} {{path/to/metadata.txt}}`
- Select the second metadata area (mda2) when printing metadata:
`pvck {{/dev/sdXN}} --dump metadata --settings "mda_num=2"`
`sudo pvck {{/dev/sdXN}} --dump metadata --settings "mda_num=2"`
- Repair headers and metadata using a metadata input file (use with care):
`pvck {{/dev/sdXN}} --repair {{[-f|--file]}} {{path/to/metadata_file}}`
`sudo pvck {{/dev/sdXN}} --repair {{[-f|--file]}} {{path/to/metadata_file}}`
- Repair only the PV header and label header:
`pvck {{/dev/sdXN}} --repairtype pv_header`
`sudo pvck {{/dev/sdXN}} --repairtype pv_header`

View File

@@ -11,8 +11,8 @@ source: https://github.com/tldr-pages/tldr.git
- Initialize the `/dev/sda1` volume for use by LVM:
`pvcreate {{/dev/sdXY}}`
`sudo pvcreate {{/dev/sdXY}}`
- Force the creation without any confirmation prompts:
`pvcreate {{[-f|--force]}} {{/dev/sdXY}}`
`sudo pvcreate {{[-f|--force]}} {{/dev/sdXY}}`

View File

@@ -10,16 +10,16 @@ source: https://github.com/tldr-pages/tldr.git
- List all physical volumes:
`pvscan`
`sudo pvscan`
- Show the volume group that uses a specific physical volume:
`pvscan --cache --listvg {{/dev/sdX}}`
`sudo pvscan --cache --listvg {{/dev/sdX}}`
- Show logical volumes that use a specific physical volume:
`pvscan --cache --listlvs {{/dev/sdX}}`
`sudo pvscan --cache --listlvs {{/dev/sdX}}`
- Display detailed information in JSON format:
`pvscan --reportformat json`
`sudo pvscan --reportformat json`

View File

@@ -14,15 +14,15 @@ source: https://github.com/tldr-pages/tldr.git
- Filter by columns:
`rfkill {{[-o|--output]}} {{ID,TYPE,DEVICE}}`
`rfkill {{[-o|--output]}} {{ID,TYPE,DEVICE,...}}`
- Block devices by type (e.g. bluetooth, wlan):
- Block devices by type:
`rfkill block {{bluetooth}}`
`rfkill block {{bluetooth|wifi|gps|nfc|...}}`
- Unblock devices by type (e.g. bluetooth, wlan):
- Unblock devices by type:
`rfkill unblock {{wlan}}`
`rfkill unblock {{bluetooth|wifi|gps|nfc|...}}`
- Output in JSON format:

View File

@@ -17,7 +17,7 @@ source: https://github.com/tldr-pages/tldr.git
`systemctl --failed`
- Start/Stop/Restart/Reload/Show the status a service:
- Start/Stop/Restart/Reload/Show the status of a service:
`systemctl {{start|stop|restart|reload|status}} {{unit}}`

View File

@@ -10,20 +10,20 @@ source: https://github.com/tldr-pages/tldr.git
- Back up metadata for all volume groups (to `/etc/lvm/backup/` by default):
`vgcfgbackup`
`sudo vgcfgbackup`
- Back up metadata for a specific volume group:
`vgcfgbackup {{vg_name}}`
`sudo vgcfgbackup {{vg_name}}`
- Write the backup to a specific file:
`vgcfgbackup {{[-f|--file]}} {{path/to/backup}} {{vg_name}}`
`sudo vgcfgbackup {{[-f|--file]}} {{path/to/backup}} {{vg_name}}`
- Back up multiple VGs using a filename template (`%s` becomes the VG name):
`vgcfgbackup {{[-f|--file]}} {{/tmp/vg-backup-%s}} {{vg1 vg2 ...}}`
`sudo vgcfgbackup {{[-f|--file]}} {{/tmp/vg-backup-%s}} {{vg1 vg2 ...}}`
- Increase verbosity (repeat `-v` for more detail):
`vgcfgbackup {{[-v|--verbose]}} {{vg_name}}`
`sudo vgcfgbackup {{[-v|--verbose]}} {{vg_name}}`

View File

@@ -10,16 +10,16 @@ source: https://github.com/tldr-pages/tldr.git
- Restore VG metadata from last backup.:
`vgcfgrestore {{vg_name}}`
`sudo vgcfgrestore {{vg_name}}`
- Restore VG metadata from specified backup-file:
`vgcfgrestore {{[-f|--file]}} {{path/to/file}} {{vg_name}}`
`sudo vgcfgrestore {{[-f|--file]}} {{path/to/file}} {{vg_name}}`
- List all VG metadata backups:
`vgcfgrestore {{[-l|--list]}} {{vg_name}}`
`sudo vgcfgrestore {{[-l|--list]}} {{vg_name}}`
- List one VG metadata backup file:
`vgcfgrestore {{[-l|--list]}} {{[-f|--file]}} {{path/to/file}} {{vg_name}}`
`sudo vgcfgrestore {{[-l|--list]}} {{[-f|--file]}} {{path/to/file}} {{vg_name}}`

View File

@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
- Add a physical volume to an existing volume group:
`vgextend {{vg1}} {{/dev/sda1}}`
`sudo vgextend {{vg1}} {{/dev/sda1}}`
- Add multiple physical volumes to an existing volume group:
`vgextend {{vg1}} {{/dev/sda1 /dev/sda2 ...}}`
`sudo vgextend {{vg1}} {{/dev/sda1 /dev/sda2 ...}}`

View File

@@ -10,19 +10,19 @@ source: https://github.com/tldr-pages/tldr.git
- Remove a volume group with confirmation:
`vgremove {{volume_group}}`
`sudo vgremove {{volume_group}}`
- Forcefully remove a volume group without confirmation:
`vgremove {{[-f|--force]}} {{volume_group}}`
`sudo vgremove {{[-f|--force]}} {{volume_group}}`
- Set the debug level for detailed logging to level 2, (repeat `--debug` up to 6 times to increase the level):
`vgremove {{[-d|--debug]}} {{[-d|--debug]}} {{volume_group}}`
`sudo vgremove {{[-d|--debug]}} {{[-d|--debug]}} {{volume_group}}`
- Use a specific config setting to override defaults:
`vgremove --config '{{global/locking_type=1}}' {{volume_group}}`
`sudo vgremove --config '{{global/locking_type=1}}' {{volume_group}}`
- Display help:

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
---
# wpa_cli
> Add and configure wlan interfaces.
> Add and configure Wi-Fi interfaces.
> More information: <https://manned.org/wpa_cli>.
- Scan for available networks:

View File

@@ -32,7 +32,7 @@ source: https://github.com/tldr-pages/tldr.git
`pg_receivewal --synchronous {{[-D|--directory]}} {{directory}} {{[-h|--host]}} {{host}} {{[-p|--port]}} {{port}} {{[-U|--username]}} {{username}}`
- Compress WAL output (gzip, level 09):
- Compress WAL output (gzip, level 0-9):
`pg_receivewal {{[-Z|--compress]}} {{level|method}} {{[-D|--directory]}} {{directory}} {{[-h|--host]}} {{host}} {{[-p|--port]}} {{port}} {{[-U|--username]}} {{username}}`

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
---
# s3cmd
> Command line tool and client for uploading, retrieving and managing data in S3 compatible object storage.
> Upload, retrieve, and manage data in S3 compatible object storage.
> More information: <https://s3tools.org/s3cmd>.
- Invoke configuration/reconfiguration tool:

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
---
# sfdk
> The command line frontend of the Sailfish SDK.
> Frontend of the Sailfish SDK.
> More information: <https://github.com/sailfishos/sailfish-qtcreator/blob/master/share/qtcreator/sfdk/modules/10-general/doc/module.adoc>.
- Execute a subcommand:

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
---
# spf
> The superfile Modern terminal file manager.
> The superfile - Modern terminal file manager.
> More information: <https://github.com/yorukot/superfile>.
- Launch `spf` with a specific path:

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
---
# VBoxManage
> Command-line interface to VirtualBox.
> Interface with VirtualBox.
> Includes all the functionality of the GUI and more.
> Some subcommands such as `startvm` have their own usage documentation.
> More information: <https://www.virtualbox.org/manual/ch08.html#vboxmanage-intro>.

29
tldr/zerotier-cli Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# zerotier-cli
> Control the local ZeroTier virtual network service.
> More information: <https://github.com/zerotier/ZeroTierOne/blob/main/doc/zerotier-cli.1.md>.
- Join a network:
`sudo zerotier-cli join {{network_id}}`
- List networks:
`sudo zerotier-cli listnetworks`
- List peers in a readable format:
`sudo zerotier-cli peers`
- Leave a network:
`sudo zerotier-cli leave {{network_id}}`
- Display the status of ZeroTier One:
`sudo zerotier-cli {{[info|status]}}`

13
tldr/zerotier-one Normal file
View File

@@ -0,0 +1,13 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# zerotier-one
> Start the ZeroTier One daemon.
> More information: <https://github.com/zerotier/ZeroTierOne/blob/main/doc/zerotier-one.8.md>.
- Start the ZeroTier One [d]aemon:
`sudo zerotier-one -d`