From 9420175cb8a623fa082b2ad7ed0b93ef4a048e0f Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Mon, 10 Nov 2025 00:21:37 +0000 Subject: [PATCH] Update cheatsheets --- tldr/arp | 8 ++++++-- tldr/cadaver | 4 ++-- tldr/doas | 1 + tldr/linux/apt-get | 14 +++++++------- tldr/linux/aptitude | 12 ++++++------ tldr/linux/dd | 6 +++--- tldr/linux/dmesg | 1 + tldr/linux/dpkg | 6 +++--- tldr/linux/hwclock | 6 +++--- tldr/linux/journalctl | 1 + tldr/linux/koji-buildinfo | 21 +++++++++++++++++++++ tldr/linux/koji-download-build | 29 +++++++++++++++++++++++++++++ tldr/linux/koji-tag-build | 25 +++++++++++++++++++++++++ tldr/linux/lsusb | 4 ++-- tldr/linux/lvs | 14 +++++++------- tldr/linux/pkexec | 1 + tldr/linux/pvs | 14 +++++++------- tldr/linux/run0 | 1 + tldr/linux/strace | 8 ++++---- tldr/linux/ufw | 16 ++++++++-------- tldr/linux/vgs | 14 +++++++------- tldr/linux/zypper | 8 ++++---- tldr/mlr | 4 ++-- tldr/npm-adduser | 6 +++--- tldr/robo | 4 ++-- tldr/sudo | 1 + tldr/wget2 | 4 ++-- 27 files changed, 159 insertions(+), 74 deletions(-) create mode 100644 tldr/linux/koji-buildinfo create mode 100644 tldr/linux/koji-download-build create mode 100644 tldr/linux/koji-tag-build diff --git a/tldr/arp b/tldr/arp index e63676cc..e2903093 100644 --- a/tldr/arp +++ b/tldr/arp @@ -10,12 +10,16 @@ source: https://github.com/tldr-pages/tldr.git - Show the current ARP table: +`arp` + +- Show [a]lternative BSD style output format with on fixed columns: + `arp -a` - [d]elete a specific entry: -`arp -d {{address}}` +`sudo arp -d {{address}}` - [s]et up a new entry in the ARP table: -`arp -s {{address}} {{mac_address}}` +`sudo arp -s {{address}} {{mac_address}}` diff --git a/tldr/cadaver b/tldr/cadaver index 225742ba..61d02a5e 100644 --- a/tldr/cadaver +++ b/tldr/cadaver @@ -12,9 +12,9 @@ source: https://github.com/tldr-pages/tldr.git `cadaver {{http://dav.example.com/}}` -- Connect to a server using a specific port and open the collection `/foo/bar/`: +- Connect to a server using a specific port and open a collection: -`cadaver {{http://dav.example.com:8022/foo/bar/}}` +`cadaver {{http://dav.example.com:8022/path/to/collection/}}` - Connect to a server using SSL: diff --git a/tldr/doas b/tldr/doas index 6dd20a45..cd8b3ac8 100644 --- a/tldr/doas +++ b/tldr/doas @@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # doas > Execute a command as another user. +> See also: `sudo`, `pkexec`, `run0`. > More information: . - Run a command as root: diff --git a/tldr/linux/apt-get b/tldr/linux/apt-get index 0b68e078..82ae1c8b 100644 --- a/tldr/linux/apt-get +++ b/tldr/linux/apt-get @@ -12,23 +12,23 @@ source: https://github.com/tldr-pages/tldr.git - Update the list of available packages and versions (it's recommended to run this before other `apt-get` commands): -`apt-get update` +`sudo apt-get update` - Install a package, or update it to the latest available version: -`apt-get install {{package}}` +`sudo apt-get install {{package}}` - Remove a package: -`apt-get remove {{package}}` +`sudo apt-get remove {{package}}` - Remove a package and its configuration files: -`apt-get purge {{package}}` +`sudo apt-get purge {{package}}` - Upgrade all installed packages to their newest available versions: -`apt-get upgrade` +`sudo apt-get upgrade` - Clean the local repository - removing package files (`.deb`) from interrupted downloads that can no longer be downloaded: @@ -36,8 +36,8 @@ source: https://github.com/tldr-pages/tldr.git - Remove all packages that are no longer needed: -`apt-get autoremove` +`sudo apt-get autoremove` - Upgrade installed packages (like `upgrade`), but remove obsolete packages and install additional packages to meet new dependencies: -`apt-get dist-upgrade` +`sudo apt-get dist-upgrade` diff --git a/tldr/linux/aptitude b/tldr/linux/aptitude index 02ecef09..9b3ed8ae 100644 --- a/tldr/linux/aptitude +++ b/tldr/linux/aptitude @@ -10,11 +10,11 @@ source: https://github.com/tldr-pages/tldr.git - Synchronize list of packages and versions available. This should be run first, before running subsequent `aptitude` commands: -`aptitude update` +`sudo aptitude update` - Install a new package and its dependencies: -`aptitude install {{package}}` +`sudo aptitude install {{package}}` - Search for a package: @@ -26,16 +26,16 @@ source: https://github.com/tldr-pages/tldr.git - Remove a package and all packages depending on it: -`aptitude remove {{package}}` +`sudo aptitude remove {{package}}` - Upgrade installed packages to the newest available versions: -`aptitude upgrade` +`sudo aptitude upgrade` - Upgrade installed packages (like `aptitude upgrade`) including removing obsolete packages and installing additional packages to meet new package dependencies: -`aptitude full-upgrade` +`sudo aptitude full-upgrade` - Put an installed package on hold to prevent it from being automatically upgraded: -`aptitude hold '?installed({{package}})'` +`sudo aptitude hold '?installed({{package}})'` diff --git a/tldr/linux/dd b/tldr/linux/dd index e2cfb21d..fd973390 100644 --- a/tldr/linux/dd +++ b/tldr/linux/dd @@ -11,11 +11,11 @@ source: https://github.com/tldr-pages/tldr.git - Make a bootable USB drive from an isohybrid file (such as `archlinux-xxx.iso`) and show the progress: -`dd if={{path/to/file.iso}} of={{/dev/usb_drive}} status=progress` +`sudo dd if={{path/to/file.iso}} of={{/dev/usb_drive}} status=progress` - Clone a drive to another drive with 4 MiB block size and flush writes before the command terminates: -`dd bs=4M conv=fsync if={{/dev/source_drive}} of={{/dev/dest_drive}}` +`sudo dd bs=4M conv=fsync if={{/dev/source_drive}} of={{/dev/dest_drive}}` - Generate a file with a specific number of random bytes by using kernel random driver: @@ -31,4 +31,4 @@ source: https://github.com/tldr-pages/tldr.git - Check the progress of an ongoing `dd` operation (run this command from another shell): -`kill -USR1 $(pgrep {{[-x|--exact]}} dd)` +`progress` diff --git a/tldr/linux/dmesg b/tldr/linux/dmesg index 4a92e67a..42723617 100644 --- a/tldr/linux/dmesg +++ b/tldr/linux/dmesg @@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # dmesg > Write the kernel messages to `stdout`. +> See also: `journalctl`. > More information: . - Show kernel messages: diff --git a/tldr/linux/dpkg b/tldr/linux/dpkg index 332ce79f..3d0da31b 100644 --- a/tldr/linux/dpkg +++ b/tldr/linux/dpkg @@ -12,11 +12,11 @@ source: https://github.com/tldr-pages/tldr.git - Install a package: -`dpkg {{[-i|--install]}} {{path/to/file.deb}}` +`sudo dpkg {{[-i|--install]}} {{path/to/file.deb}}` - Remove a package: -`dpkg {{[-r|--remove]}} {{package}}` +`sudo dpkg {{[-r|--remove]}} {{package}}` - List installed packages: @@ -36,4 +36,4 @@ source: https://github.com/tldr-pages/tldr.git - Purge an installed or already removed package, including configuration: -`dpkg {{[-P|--purge]}} {{package}}` +`sudo dpkg {{[-P|--purge]}} {{package}}` diff --git a/tldr/linux/hwclock b/tldr/linux/hwclock index 5ca4b9c2..2077cd0f 100644 --- a/tldr/linux/hwclock +++ b/tldr/linux/hwclock @@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git - Display the current time as reported by the hardware clock: -`hwclock` +`sudo hwclock` - Write the current software clock time to the hardware clock (sometimes used during system setup): -`hwclock {{[-w|--systohc]}}` +`sudo hwclock {{[-w|--systohc]}}` - Write the current hardware clock time to the software clock: -`hwclock {{[-s|--hctosys]}}` +`sudo hwclock {{[-s|--hctosys]}}` diff --git a/tldr/linux/journalctl b/tldr/linux/journalctl index 4de6fbb0..fb1309dd 100644 --- a/tldr/linux/journalctl +++ b/tldr/linux/journalctl @@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # journalctl > Query the systemd journal. +> See also: `dmesg`. > More information: . - Show all messages with priority level 3 (errors) from this boot: diff --git a/tldr/linux/koji-buildinfo b/tldr/linux/koji-buildinfo new file mode 100644 index 00000000..ffcdbb80 --- /dev/null +++ b/tldr/linux/koji-buildinfo @@ -0,0 +1,21 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# koji buildinfo + +> Print basic information about a build. +> More information: . + +- Print basic information: + +`koji buildinfo {{BuildID_or_NVR1 BuildID_or_NRV2 ...}}` + +- Print basic information with changelog: + +`koji buildinfo {{BuildID_or_NVR1 BuildID_or_NRV2 ...}} --changelog` + +- Display help: + +`koji buildinfo --help` diff --git a/tldr/linux/koji-download-build b/tldr/linux/koji-download-build new file mode 100644 index 00000000..c98b14fa --- /dev/null +++ b/tldr/linux/koji-download-build @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# koji download-build + +> Download a built package. +> More information: . + +- Download all RPMs from a specific build: + +`koji download-build {{BuildID|RPM|NVR}}` + +- Download RPMs signed with the given key: + +`koji download-build {{BuildID|RPM|NVR}} --key {{key}}` + +- Only download RPMs for given arch: + +`koji download-build {{BuildID|RPM|NVR}} --arch {{x86_64,aarch64,noarch,...}}` + +- Download the given RPM: + +`koji download-build {{RPM}} --rpm` + +- Display help: + +`koji download-build --help` diff --git a/tldr/linux/koji-tag-build b/tldr/linux/koji-tag-build new file mode 100644 index 00000000..e9d9cd61 --- /dev/null +++ b/tldr/linux/koji-tag-build @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# koji tag-build + +> Apply a tag to one or more builds. +> More information: . + +- Apply a tag to one or more builds: + +`koji tag-build {{tag}} {{NVR1 NVR2 ...}}` + +- Don't wait on task: + +`koji tag-build {{tag}} {{NVR1 NVR2 ...}} --nowait` + +- Force operation: + +`koji tag-build {{tag}} {{NVR1 NVR2 ...}} --force` + +- Display help: + +`koji tag-build --help` diff --git a/tldr/linux/lsusb b/tldr/linux/lsusb index 89174437..9d30e333 100644 --- a/tldr/linux/lsusb +++ b/tldr/linux/lsusb @@ -18,11 +18,11 @@ source: https://github.com/tldr-pages/tldr.git - List verbose information about USB devices: -`lsusb {{[-v|--verbose]}}` +`sudo lsusb {{[-v|--verbose]}}` - List detailed information about a USB device: -`lsusb {{[-v|--verbose]}} -s {{bus}}:{{device number}}` +`sudo lsusb {{[-v|--verbose]}} -s {{bus}}:{{device number}}` - List devices with a specified vendor and product ID only: diff --git a/tldr/linux/lvs b/tldr/linux/lvs index 1071fb30..8aa4126e 100644 --- a/tldr/linux/lvs +++ b/tldr/linux/lvs @@ -11,28 +11,28 @@ source: https://github.com/tldr-pages/tldr.git - Display information about logical volumes: -`lvs` +`sudo lvs` - Display all logical volumes: -`lvs {{[-a|--all]}}` +`sudo lvs {{[-a|--all]}}` - Change default display to show more details: -`lvs {{[-v|--verbose]}}` +`sudo lvs {{[-v|--verbose]}}` - Display only specific fields: -`lvs {{[-o|--options]}} {{field_name_1}},{{field_name_2}}` +`sudo lvs {{[-o|--options]}} {{field_name_1}},{{field_name_2}}` - Append field to default display: -`lvs {{[-o|--options]}} +{{field_name}}` +`sudo lvs {{[-o|--options]}} +{{field_name}}` - Suppress heading line: -`lvs --noheadings` +`sudo lvs --noheadings` - Use a separator to separate fields: -`lvs --separator {{=}}` +`sudo lvs --separator {{=}}` diff --git a/tldr/linux/pkexec b/tldr/linux/pkexec index 2f5b5c22..40024871 100644 --- a/tldr/linux/pkexec +++ b/tldr/linux/pkexec @@ -7,6 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Execute commands as another user. > Asks for password in a GUI if available. +> See also: `sudo`, `run0`, `doas`. > More information: . - Run command as root: diff --git a/tldr/linux/pvs b/tldr/linux/pvs index 538392a1..a37248a1 100644 --- a/tldr/linux/pvs +++ b/tldr/linux/pvs @@ -11,28 +11,28 @@ source: https://github.com/tldr-pages/tldr.git - Display information about physical volumes: -`pvs` +`sudo pvs` - Display non-physical volumes: -`pvs {{[-a|--all]}}` +`sudo pvs {{[-a|--all]}}` - Change default display to show more details: -`pvs {{[-v|--verbose]}}` +`sudo pvs {{[-v|--verbose]}}` - Display only specific fields: -`pvs {{[-o|--options]}} {{field_name_1}},{{field_name_2}}` +`sudo pvs {{[-o|--options]}} {{field_name_1}},{{field_name_2}}` - Append field to default display: -`pvs {{[-o|--options]}} +{{field_name}}` +`sudo pvs {{[-o|--options]}} +{{field_name}}` - Suppress heading line: -`pvs --noheadings` +`sudo pvs --noheadings` - Use separator to separate fields: -`pvs --separator {{special_character}}` +`sudo pvs --separator {{special_character}}` diff --git a/tldr/linux/run0 b/tldr/linux/run0 index cd0cf067..55359b43 100644 --- a/tldr/linux/run0 +++ b/tldr/linux/run0 @@ -7,6 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Elevate privileges interactively. > Similar to `sudo`, but it's not a SUID binary, authentication takes place via polkit, and commands are invoked from a `systemd` service. +> See also: `sudo`, `pkexec`, `doas`. > More information: . - Run a command as root: diff --git a/tldr/linux/strace b/tldr/linux/strace index e8bf91b0..d76ba391 100644 --- a/tldr/linux/strace +++ b/tldr/linux/strace @@ -10,19 +10,19 @@ source: https://github.com/tldr-pages/tldr.git - Start tracing a specific process by its PID: -`strace {{[-p|--attach]}} {{pid}}` +`sudo strace {{[-p|--attach]}} {{pid}}` - Trace a process and filter output by system call [e]xpression: -`strace {{[-p|--attach]}} {{pid}} -e {{system_call,system_call2,...}}` +`sudo strace {{[-p|--attach]}} {{pid}} -e {{system_call,system_call2,...}}` - Count time, calls, and errors for each system call and report a summary on program exit: -`strace {{[-p|--attach]}} {{pid}} {{[-c|--summary-only]}}` +`sudo strace {{[-p|--attach]}} {{pid}} {{[-c|--summary-only]}}` - Show the time spent in every system call and specify the maximum string size to print: -`strace {{[-p|--attach]}} {{pid}} {{[-T|--syscall-times]}} {{[-s|--string-limit]}} {{32}}` +`sudo strace {{[-p|--attach]}} {{pid}} {{[-T|--syscall-times]}} {{[-s|--string-limit]}} {{32}}` - Start tracing a program by executing it: diff --git a/tldr/linux/ufw b/tldr/linux/ufw index 61a6cf11..a474e4d9 100644 --- a/tldr/linux/ufw +++ b/tldr/linux/ufw @@ -11,32 +11,32 @@ source: https://github.com/tldr-pages/tldr.git - Enable `ufw`: -`ufw enable` +`sudo ufw enable` - Disable `ufw`: -`ufw disable` +`sudo ufw disable` - Show `ufw` rules, along with their numbers: -`ufw status numbered` +`sudo ufw status numbered` - Allow incoming traffic on port 5432 on this host with a comment identifying the service: -`ufw allow 5432 comment "{{Service}}"` +`sudo ufw allow 5432 comment "{{Service}}"` - Allow only TCP traffic from 192.168.0.4 to any address on this host, on port 22: -`ufw allow proto tcp from 192.168.0.4 to any port 22` +`sudo ufw allow proto tcp from 192.168.0.4 to any port 22` - Deny traffic on port 80 on this host: -`ufw deny 80` +`sudo ufw deny 80` - Deny all UDP traffic to ports in range 8412:8500: -`ufw deny proto udp from any to any port 8412:8500` +`sudo ufw deny proto udp from any to any port 8412:8500` - Delete a particular rule. The rule number can be retrieved from the `ufw status numbered` command: -`ufw delete {{rule_number}}` +`sudo ufw delete {{rule_number}}` diff --git a/tldr/linux/vgs b/tldr/linux/vgs index f06aadfe..61881b4c 100644 --- a/tldr/linux/vgs +++ b/tldr/linux/vgs @@ -11,28 +11,28 @@ source: https://github.com/tldr-pages/tldr.git - Display information about volume groups: -`vgs` +`sudo vgs` - Display all volume groups: -`vgs {{[-a|--all]}}` +`sudo vgs {{[-a|--all]}}` - Change default display to show more details: -`vgs {{[-v|--verbose]}}` +`sudo vgs {{[-v|--verbose]}}` - Display only specific fields: -`vgs {{[-o|--options]}} {{field_name_1}},{{field_name_2}}` +`sudo vgs {{[-o|--options]}} {{field_name_1}},{{field_name_2}}` - Append field to default display: -`vgs {{[-o|--options]}} +{{field_name}}` +`sudo vgs {{[-o|--options]}} +{{field_name}}` - Suppress heading line: -`vgs --noheadings` +`sudo vgs --noheadings` - Use separator to separate fields: -`vgs --separator =` +`sudo vgs --separator =` diff --git a/tldr/linux/zypper b/tldr/linux/zypper index cb44edc8..38d272a5 100644 --- a/tldr/linux/zypper +++ b/tldr/linux/zypper @@ -11,19 +11,19 @@ source: https://github.com/tldr-pages/tldr.git - Synchronize list of packages and versions available: -`zypper {{[ref|refresh]}}` +`sudo zypper {{[ref|refresh]}}` - Install a new package: -`zypper {{[in|install]}} {{package}}` +`sudo zypper {{[in|install]}} {{package}}` - Remove a package: -`zypper {{[rm|remove]}} {{package}}` +`sudo zypper {{[rm|remove]}} {{package}}` - Upgrade installed packages to the newest available versions: -`zypper {{[up|update]}}` +`sudo zypper {{[up|update]}}` - Search package via keyword: diff --git a/tldr/mlr b/tldr/mlr index 735af2ae..0bf2a6de 100644 --- a/tldr/mlr +++ b/tldr/mlr @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Receive JSON data and pretty print the output: -`echo '{"hello":"world"}' | mlr --ijson --opprint cat` +`{{echo '{"key":"value"}'}} | mlr --ijson --opprint cat` - Sort alphabetically on a field: @@ -30,7 +30,7 @@ source: https://github.com/tldr-pages/tldr.git - Receive JSON and format the output as vertical JSON: -`echo '{"hello":"world", "foo":"bar"}' | mlr --ijson --ojson --jvstack cat` +`{{echo '{"key1":"value1", "key2":"value2"}'}} | mlr --ijson --ojson --jvstack cat` - Filter lines of a compressed CSV file treating numbers as [S]trings: diff --git a/tldr/npm-adduser b/tldr/npm-adduser index 3e692a8c..11517180 100644 --- a/tldr/npm-adduser +++ b/tldr/npm-adduser @@ -14,12 +14,12 @@ source: https://github.com/tldr-pages/tldr.git - Log in to a private registry with a specific scope: -`npm login --scope {{@mycorp}} --registry {{https://registry.mycorp.com}}` +`npm login --scope {{@organization}} --registry {{https://registry.example.com}}` - Log out from a specific scope and remove the auth token: -`npm logout --scope {{@mycorp}}` +`npm logout --scope {{@organization}}` - Create a scoped package during initialization: -`npm init --scope {{@foo}} {{[-y|--yes]}}` +`npm init --scope {{@organization}} {{[-y|--yes]}}` diff --git a/tldr/robo b/tldr/robo index 4556f4c3..238467fe 100644 --- a/tldr/robo +++ b/tldr/robo @@ -14,8 +14,8 @@ source: https://github.com/tldr-pages/tldr.git - Run a specific command: -`robo {{foo}}` +`robo {{command}}` - Simulate running a specific command: -`robo --simulate {{foo}}` +`robo --simulate {{command}}` diff --git a/tldr/sudo b/tldr/sudo index e4c58856..da6520a4 100644 --- a/tldr/sudo +++ b/tldr/sudo @@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # sudo > Execute a single command as the superuser or another user. +> See also: `pkexec`, `run0`, `doas`. > More information: . - Run a command as the superuser: diff --git a/tldr/wget2 b/tldr/wget2 index 8363d352..3aff16d5 100644 --- a/tldr/wget2 +++ b/tldr/wget2 @@ -12,11 +12,11 @@ source: https://github.com/tldr-pages/tldr.git - Download the contents of a URL to a file using multiple threads (default behavior differs from `wget`): -`wget2 {{https://example.com/foo}}` +`wget2 {{https://example.com/resource}}` - Limit the number of threads used for downloading (default is 5 threads): -`wget2 --max-threads {{10}} {{https://example.com/foo}}` +`wget2 --max-threads {{10}} {{https://example.com/resource}}` - Download a single web page and all its resources (scripts, stylesheets, images, etc.):