Update cheatsheets

This commit is contained in:
ivuorinen
2025-07-31 00:21:38 +00:00
parent f892946174
commit fcb8fde17a
127 changed files with 564 additions and 116 deletions

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# alien
> Convert different installation packages to other formats.
> See also: `debtap`, for `.deb` conversion on Arch Linux.
> See also: `debtap` for `.deb` conversion on Arch Linux.
> More information: <https://manned.org/alien>.
- Convert a specific installation file to Debian format (`.deb` extension):

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# aurman
> An Arch Linux utility to build and install packages from the Arch User Repository.
> See also `pacman`.
> See also: `pacman`.
> More information: <https://github.com/polygamma/aurman>.
- Synchronize and update all packages:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# bspwm
> A tiling window manager based on binary space partitioning.
> See also: `bspc`, for controlling it.
> See also: `bspc` for controlling it.
> More information: <https://github.com/baskerville/bspwm>.
- Start `bspwm` (note that a pre-existing window manager must not be open when this command is run):

33
tldr/linux/bsub Normal file
View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# bsub
> Submit batch jobs to LSF (Load Sharing Facility) scheduler.
> More information: <https://www.ibm.com/docs/spectrum-lsf/latest?topic=reference-bsub>.
- Submit a script file as a job:
`bsub {{path/to/script.sh}}`
- Submit a job to a specific queue:
`bsub -q {{queue_name}} make all`
- Submit a job with a name and redirect output and error:
`bsub -J {{job_name}} --output {{path/to/output.log}} --error {{path/to/error.log}} {{path/to/script.sh}}`
- Request 8 CPU cores and 16GB memory for a command:
`bsub -n 8 -M 16G cargo build --release`
- Run an interactive shell in the current session:
`bsub -I bash`
- Submit a job with a runtime limit of 45 minutes:
`bsub -W 45 {{path/to/script.sh}}`

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# compsize
> Calculate the compression ratio of a set of files on a btrfs filesystem.
> See also `btrfs filesystem` for recompressing a file by defragmenting it.
> See also: `btrfs filesystem` for recompressing a file by defragmenting it.
> More information: <https://manned.org/compsize>.
- Calculate the current compression ratio for a file or directory:

View File

@@ -6,7 +6,8 @@ source: https://github.com/tldr-pages/tldr.git
# ddcutil
> Control the settings of connected displays via DDC/CI.
> This command requires the kernel module `i2c-dev` to be loaded. See also: `modprobe`.
> This command requires the kernel module `i2c-dev` to be loaded.
> See also: `modprobe`.
> More information: <https://www.ddcutil.com>.
- List all compatible displays:

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> Change DOS-style line endings to Unix-style.
> Replaces CRLF with LF.
> See also `unix2dos`, `unix2mac`, and `mac2unix`.
> See also: `unix2dos`, `unix2mac`, `mac2unix`.
> More information: <https://manned.org/dos2unix>.
- Change the line endings of a file:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# extundelete
> Recover deleted files from ext3 or ext4 partitions by parsing the journal.
> See also `date` for Unix time information and `umount` for unmounting partitions.
> See also: `date` for Unix time information and `umount` for unmounting partitions.
> More information: <https://extundelete.sourceforge.net/options.html>.
- Restore all deleted files inside partition N on device X:

View File

@@ -5,18 +5,26 @@ source: https://github.com/tldr-pages/tldr.git
---
# flock
> Manage locks from shell scripts.
> It can be used to ensure that only one process of a command is running.
> Manage file locks from shell scripts.
> It can be used to ensure that only one instance of a command is running.
> More information: <https://manned.org/flock>.
- Run a command with a file lock as soon as the lock is not required by others:
- Run a command with a file lock as soon as the lock is available:
`flock {{path/to/lock.lock}} {{[-c|--command]}} "{{command}}"`
`flock {{path/to/lock.lock}} {{command}}`
- Run a command with a file lock, and exit if the lock doesn't exist:
- Run a command with a file lock, or exit if the lock is currently being held (with exit code 1):
`flock {{path/to/lock.lock}} {{[-n|--nonblock]}} {{[-c|--command]}} "{{command}}"`
`flock {{path/to/lock.lock}} {{[-n|--nonblock]}} {{command}}`
- Run a command with a file lock, and exit with a specific error code if the lock doesn't exist:
- Run a command with a file lock, or exit with a specific error code if the lock is currently being held:
`flock {{path/to/lock.lock}} {{[-n|--nonblock]}} {{[-E|--conflict-exit-code]}} {{error_code}} {{[-c|--command]}} "{{command}}"`
`flock {{path/to/lock.lock}} {{[-n|--nonblock]}} {{[-E|--conflict-exit-code]}} {{123}} {{command}}`
- Run a command with a file lock, waiting up to 10 seconds for the lock to be available before giving up:
`flock {{path/to/lock.lock}} {{[-w|--timeout]}} 10 {{command}}`
- Backup a bunch of files, waiting for the previous `tar` command to finish if it's still running elsewhere and holding the same lock file (can be used in a `cron` job that runs often):
`flock {{path/to/backup.lock}} {{tar -cvf path/to/backup.tar path/to/data/}}`

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# insmod
> Dynamically load modules into the Linux Kernel.
> See also: `kmod`, for other module management commands.
> See also: `kmod` for other module management commands.
> More information: <https://manned.org/insmod>.
- Insert a kernel module into the Linux kernel:

View File

@@ -6,7 +6,8 @@ source: https://github.com/tldr-pages/tldr.git
# iptables
> Configure tables, chains and rules of the Linux kernel IPv4 firewall.
> Use `ip6tables` to set rules for IPv6 traffic. See also: `iptables-save`, `iptables-restore`.
> Use `ip6tables` to set rules for IPv6 traffic.
> See also: `iptables-save`, `iptables-restore`.
> More information: <https://manned.org/iptables>.
- View chains, rules, packet/byte counters and line numbers for the filter table:

View File

@@ -9,7 +9,7 @@ source: https://github.com/tldr-pages/tldr.git
> For a list of channels, frequencies and reg information: <https://wireless.docs.kernel.org/en/latest/en/developers/documentation/channellist.html>.
> More information: <https://wireless.docs.kernel.org/en/latest/en/users/documentation/iw.html>.
- Set device to monitor mode (interface must be down first. See also `ip link`):
- Set device to monitor mode (interface must be down first. See also: `ip link`):
`sudo iw dev {{wlp}} set type monitor`

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# kwrite
> Text editor of the KDE Desktop project.
> See also `kate`.
> See also: `kate`.
> More information: <https://docs.kde.org/stable5/en/kate/kwrite/command-line-options.html>.
- Open a text file:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# ldapdomaindump
> Dump users, computers, groups, OS and membership information via LDAP to HTML, JSON and greppable output.
> See also `ldapsearch`.
> See also: `ldapsearch`.
> More information: <https://github.com/dirkjanm/ldapdomaindump#usage>.
- Dump all information using the given LDAP account:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# lsmod
> Show the status of Linux kernel modules.
> See also: `kmod`, for other module management commands.
> See also: `kmod` for other module management commands.
> More information: <https://manned.org/lsmod>.
- List all currently loaded kernel modules:

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> Change macOS-style line endings to Unix-style.
> Replaces CR with LF.
> See also `unix2dos`, `unix2mac`, and `dos2unix`.
> See also: `unix2dos`, `unix2mac`, `dos2unix`.
> More information: <https://manned.org/mac2unix>.
- Change the line endings of a file:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# mesg
> Check or set a terminal's ability to receive messages from other users, usually from the `write` command.
> See also `write`, `talk`.
> See also: `write`, `talk`.
> More information: <https://manned.org/mesg>.
- Check terminal's openness to write messages:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# modinfo
> Extract information about a Linux kernel module.
> See also: `kmod`, for other module management commands.
> See also: `kmod` for other module management commands.
> More information: <https://manned.org/modinfo>.
- List all attributes of a kernel module:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# modprobe
> Add or remove modules from the Linux kernel.
> See also: `kmod`, for other module management commands.
> See also: `kmod` for other module management commands.
> More information: <https://manned.org/modprobe>.
- Pretend to load a module into the kernel, but don't actually do it:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# openrc
> The OpenRC service manager.
> See also: `rc-status`, `rc-update`, and `rc-service`.
> See also: `rc-status`, `rc-update`, `rc-service`.
> More information: <https://wiki.gentoo.org/wiki/OpenRC>.
- Change to a specific runlevel:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# pkgfile
> Search files from packages in the official repositories on Arch-based systems.
> See also: `pacman files`, describing the usage of `pacman --files`.
> See also: `pacman files` describing the usage of `pacman --files`.
> More information: <https://manned.org/pkgfile>.
- Synchronize the pkgfile database:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# postfix
> Postfix mail transfer agent (MTA) control program.
> See also `dovecot`, a mail delivery agent (MDA) that integrates with Postfix.
> See also: `dovecot`, a mail delivery agent (MDA) that integrates with Postfix.
> More information: <https://www.postfix.org>.
- Check the configuration:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# pw-dot
> Create `.dot` files of the PipeWire graph.
> See also: `dot`, for rendering graph.
> See also: `dot` for rendering graph.
> More information: <https://docs.pipewire.org/page_man_pw-dot_1.html>.
- Generate a graph to `pw.dot` file:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# quickemu
> Build and manage highly optimised desktop virtual machines quickly.
> See also: `quickget`, for preparing VM configurations.
> See also: `quickget` for preparing VM configurations.
> More information: <https://github.com/quickemu-project/quickemu>.
- Create and run a virtual machine from a configuration file:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# rc-service
> Locate and run OpenRC services with arguments.
> See also `openrc`.
> See also: `openrc`.
> More information: <https://manned.org/rc-service>.
- Show a service's status:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# rc-status
> Show status info about runlevels.
> See also `openrc`.
> See also: `openrc`.
> More information: <https://manned.org/rc-status>.
- Show a summary of services and their status:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# rc-update
> Add and remove OpenRC services to and from runlevels.
> See also `openrc`.
> See also: `openrc`.
> More information: <https://manned.org/rc-update>.
- List enabled services and the runlevels they are added to:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# rmmod
> Remove modules from the Linux kernel.
> See also: `kmod`, for other module management commands.
> See also: `kmod` for other module management commands.
> More information: <https://manned.org/rmmod>.
- Remove a module from the kernel:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# sinfo
> View information about Slurm nodes and partitions.
> See also `squeue` and `sbatch`, which are also part of the Slurm workload manager.
> See also: `squeue`, `sbatch`, which are also part of the Slurm workload manager.
> More information: <https://slurm.schedmd.com/sinfo.html>.
- Show a quick summary overview of the cluster:

42
tldr/linux/stratis Normal file
View File

@@ -0,0 +1,42 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# stratis
> Manage local storage pools and volumes using the Stratis storage manager.
> Stratis volumes use the XFS filesystem and require the `stratisd` service.
> More information: <https://stratis-storage.github.io>.
- Start the Stratis service (must be active before managing pools or volumes):
`sudo systemctl start stratisd`
- Create a storage pool from one or more devices:
`sudo stratis pool create {{pool_name}} {{/dev/sdX}} {{/dev/sdY}}`
- Create a filesystem (volume) in a pool:
`sudo stratis filesystem create {{pool_name}} {{volume_name}}`
- List all Stratis filesystems:
`sudo stratis filesystem list`
- Format and mount a Stratis volume manually:
`sudo mkfs.xfs /dev/stratis/{{pool_name}}/{{volume_name}} && sudo mount /dev/stratis/{{pool_name}}/{{volume_name}} {{/mnt/target}}`
- Add a volume to `/etc/fstab` for mounting at boot:
`echo /dev/stratis/{{pool_name}}/{{volume_name}} {{/mnt/target}} xfs defaults,x-systemd.requires=stratisd.service 0 0 | sudo tee {{[-a|--append]}} /etc/fstab`
- Extend an existing pool by adding a new device:
`sudo stratis pool add-data {{pool_name}} {{/dev/sdZ}}`
- Delete a volume:
`sudo stratis filesystem destroy {{pool_name}} {{volume_name}}`

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# tlp
> Advanced power management for Linux.
> See also `tlp-stat`.
> See also: `tlp-stat`.
> More information: <https://linrunner.de/tlp/usage/tlp.html>.
- Apply settings (according to the actual power source):

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# tlp-stat
> Generate TLP status reports.
> See also `tlp`.
> See also: `tlp`.
> More information: <https://linrunner.de/tlp/usage/tlp-stat>.
- Generate status report with configuration and all active settings:

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> Change Unix-style line endings to DOS-style.
> Replaces LF with CRLF.
> See also `unix2mac`, `dos2unix`, and `mac2unix`.
> See also: `unix2mac`, `dos2unix`, `mac2unix`.
> More information: <https://manned.org/unix2dos>.
- Change the line endings of a file:

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> Change Unix-style line endings to macOS-style.
> Replaces LF with CR.
> See also `unix2dos`, `dos2unix`, and `mac2unix`.
> See also: `unix2dos`, `dos2unix`, `mac2unix`.
> More information: <https://manned.org/unix2mac>.
- Change the line endings of a file:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# uuid
> Generate and decode Universally Unique Identifiers (UUID).
> See also `uuidgen`.
> See also: `uuidgen`.
> More information: <https://manned.org/uuid>.
- Generate a UUIDv1 (based on time and system's hardware address, if present):

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# uuidgen
> Generate unique identifiers (UUIDs).
> See also `uuid`.
> See also: `uuid`.
> More information: <https://manned.org/uuidgen>.
- Create a random UUIDv4:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# vgscan
> Scan for volume groups on all supported Logical Volume Manager (LVM) block devices.
> See also: `lvm` and `vgchange`.
> See also: `lvm`, `vgchange`.
> More information: <https://manned.org/vgscan>.
- Scan for volume groups and print information about each group found:

View File

@@ -6,7 +6,8 @@ source: https://github.com/tldr-pages/tldr.git
# write
> Write a message on the terminal of a specified logged in user (`<Ctrl c>` to stop writing messages).
> Use the `who` command to find out all terminal_ids of all active users active on the system. See also `mesg`.
> Use the `who` command to find out all terminal_ids of all active users active on the system.
> See also: `mesg`.
> More information: <https://manned.org/write>.
- Send a message to a given user on a given terminal ID: