Update cheatsheets

This commit is contained in:
ivuorinen
2025-08-27 00:19:48 +00:00
parent 114611fd19
commit 9565d2532c
21 changed files with 167 additions and 54 deletions

View File

@@ -32,7 +32,7 @@ source: https://github.com/tldr-pages/tldr.git
`sudo apachectl graceful`
- Print full Apache configuration:
- Print full Apache configuration (not always supported):
`apachectl -S`

View File

@@ -19,3 +19,7 @@ source: https://github.com/tldr-pages/tldr.git
- Play the raw file as a 22050 Hz, mono, 8-bit, Mu-Law `.au` file:
`aplay {{[-c|--channels]}} {{1}} {{[-t|--file-type]}} {{raw}} {{[-r|--rate]}} {{22050}} {{[-f|--format]}} {{mu_law}} {{path/to/file}}`
- List available audio devices:
`aplay {{[-l|--list-devices]}}`

View File

@@ -12,18 +12,22 @@ source: https://github.com/tldr-pages/tldr.git
`brightnessctl {{[-l|--list]}}`
- Print the current brightness of the display backlight:
- Print the current brightness of the default device:
`brightnessctl get`
`brightnessctl {{[g|get]}}`
- Set the brightness of the display backlight to a specified percentage within range:
- Print the current brightness of a specific device (can be a wildcard):
`brightnessctl set {{50%}}`
`brightnessctl {{[g|get]}} {{[-d|--device]}} '{{device_name}}'`
- Increase brightness by a specified increment:
- Set the brightness to a specified percentage:
`brightnessctl set {{+10%}}`
`brightnessctl {{[s|set]}} {{50}}%`
- Decrease brightness by a specified decrement:
- Increase brightness by a specified percentage:
`brightnessctl set {{10%-}}`
`brightnessctl {{[s|set]}} +{{10}}%`
- Decrease brightness by a specified percentage:
`brightnessctl {{[s|set]}} {{10}}%-`

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
---
# fdisk
> Manage partition tables and partitions on a hard disk.
> Manage partition tables and partitions on a storage drive.
> See also: `partprobe`.
> More information: <https://manned.org/fdisk>.

17
tldr/linux/fgconsole Normal file
View File

@@ -0,0 +1,17 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# fgconsole
> Print the number of the foreground virtual terminal.
> More information: <https://manned.org/fgconsole>.
- Print current terminal number or `serial` if the terminal is serial:
`fgconsole`
- Print the next unallocated virtual terminal:
`fgconsole {{[-n|--next-available]}}`

17
tldr/linux/pacsift Normal file
View File

@@ -0,0 +1,17 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# pacsift
> Query and filter packages.
> More information: <https://github.com/andrewgregory/pacutils/blob/master/doc/pacsift.pod>.
- List all available packages:
`pacsift`
- Filter packages that provide a given package:
`pacsift --satisfies {{package}}`

View File

@@ -12,13 +12,13 @@ source: https://github.com/tldr-pages/tldr.git
`qm {{[cr|create]}} {{100}}`
- Automatically start the machine after creation:
- Give the virtual machine a name and automatically start the machine after creation:
`qm {{[cr|create]}} {{100}} --start`
`qm {{[cr|create]}} {{100}} --name {{vm_name}} --start`
- Give the virtual machine a name:
- Give a virtual machine specified amount of memory and CPUs:
`qm {{[cr|create]}} {{100}} --name {{vm_name}}`
`qm {{[cr|create]}} {{100}} --memory {{8192}} --cores {{4}}`
- Specify the type of operating system on the machine:

View File

@@ -30,4 +30,8 @@ source: https://github.com/tldr-pages/tldr.git
- Delete a device:
`qm set {{100}} --delete {{device_name0}}`
`qm set {{100}} --delete {{device_name0,device_name1,...}}`
- Passthrough a GPU device to the guest:
`qm set {{100}} --hostpci{{0}} {{0000:00:02}},x-vga=1 --bios ovmf`

View File

@@ -11,32 +11,32 @@ source: https://github.com/tldr-pages/tldr.git
- Show version of httpd package:
`rpm --query {{httpd}}`
`rpm {{[-q|--query]}} {{httpd}}`
- List versions of all matching packages:
`rpm --query --all '{{mariadb*}}'`
`rpm {{[-qa|--query --all]}} '{{mariadb*}}'`
- Forcibly install a package regardless of currently installed versions:
`rpm --upgrade {{path/to/package.rpm}} --force`
`rpm {{[-U|--upgrade]}} {{path/to/package.rpm}} --force`
- Identify owner of a file and show version of the package:
`rpm --query --file {{/etc/postfix/main.cf}}`
`rpm {{[-qf|--query --file]}} {{/etc/postfix/main.cf}}`
- List package-owned files:
`rpm --query --list {{kernel}}`
`rpm {{[-ql|--query --list]}} {{kernel}}`
- Show scriptlets from an RPM file:
`rpm --query --package --scripts {{package.rpm}}`
`rpm {{[-qp|--query --package]}} --scripts {{package.rpm}}`
- Show changed, missing and/or incorrectly installed files of matching packages:
`rpm --verify --all '{{php-*}}'`
`rpm {{[-Va|--verify --all]}} '{{php-*}}'`
- Display the changelog of a specific package:
`rpm --query --changelog {{package}}`
`rpm {{[-q|--query]}} --changelog {{package}}`

17
tldr/linux/systemctl-mask Normal file
View File

@@ -0,0 +1,17 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# systemctl mask
> Link units to `/dev/null` so that they can be even started.
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#mask%20UNIT%E2%80%A6>.
- Mask a service:
`systemctl mask {{service_name}}`
- Ensure that the service is shut down while masking:
`systemctl mask {{service_name}} --now`

View File

@@ -15,3 +15,15 @@ source: https://github.com/tldr-pages/tldr.git
- Write the output of a pipeline to the journal (`stderr` stays connected to the terminal):
`{{command}} | systemd-cat`
- Use the specified identifier (default: `cat` when reading from a pipeline, executable name otherwise):
`{{command}} | systemd-cat {{[-t|--identifier]}} {{id}}`
- Use the specified default priority level for all logged messages:
`systemd-cat {{[-p|--priority]}} {{emerg|alert|crit|err|warning|notice|info|debug}} {{command}}`
- Use the specified default priority level for the logged messages from the command's `stderr`:
`systemd-cat --stderr-priority {{emerg|alert|crit|err|warning|notice|info|debug}} {{command}}`

View File

@@ -20,3 +20,7 @@ source: https://github.com/tldr-pages/tldr.git
- Print the contents of all configuration files (before each file, its name is printed as a comment):
`systemd-sysusers --cat-config`
- Create users based on files listed in the previous command:
`systemd-sysusers`

View File

@@ -5,30 +5,9 @@ source: https://github.com/tldr-pages/tldr.git
---
# yum
> Package management utility for RHEL, Fedora, and CentOS (for older versions).
> For equivalent commands in other package managers, see <https://wiki.archlinux.org/title/Pacman/Rosetta>.
> More information: <https://manned.org/yum>.
> This command is an alias of `dnf` on modern distros.
> For older distros (e.g. CentOS 7), `yum` is a distinct program from `dnf`. Some subcommands and options may be different.
- Install a new package:
- View documentation for the original command:
`yum install {{package}}`
- Install a new package and assume yes to all questions (also works with update, great for automated updates):
`yum {{[-y|--assumeyes]}} install {{package}}`
- Find the package that provides a particular command:
`yum provides {{command}}`
- Remove a package:
`yum remove {{package}}`
- Display available updates for installed packages:
`yum check-update`
- Upgrade installed packages to the newest available versions:
`yum upgrade`
`tldr dnf`