Update cheatsheets

This commit is contained in:
ivuorinen
2025-08-29 00:19:35 +00:00
parent 241ab8e29f
commit d47b8df328
13 changed files with 130 additions and 11 deletions

View File

@@ -36,6 +36,6 @@ source: https://github.com/tldr-pages/tldr.git
`git diff {{branch_1}}..{{branch_2}} {{path/to/file}}`
- Compare different files from the current branch to other branch:
- Compare different files from the current branch to another branch:
`git diff {{branch}}:{{path/to/file2}} {{path/to/file}}`
`git diff {{other_branch}}:{{path/to/file2}} {{path/to/file1}}`

22
tldr/linux/cec-ctl Normal file
View File

@@ -0,0 +1,22 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# cec-ctl
> Control kernel CEC devices.
> See also: `cec-client`.
> More information: <https://manned.org/cec-ctl>.
- List CEC devices:
`cec-ctl --list-devices`
- Monitor CEC traffic:
`sudo cec-ctl {{[-m|--monitor]}}`
- Show CEC topology:
`cec-ctl {{[-S|--show-topology]}}`

23
tldr/linux/dnf-download Normal file
View File

@@ -0,0 +1,23 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# dnf download
> Download RPM packages from the DNF repositories.
> Not default to `dnf` but supported via `dnf-plugins-core`.
> See also: `dnf`.
> More information: <https://dnf-plugins-core.readthedocs.io/en/latest/download.html>.
- Download the latest version of a package to the current directory:
`dnf download {{package}}`
- Download a package to a specific directory (the directory must exist):
`dnf download {{package}} --destdir {{path/to/directory}}`
- Print the URL where the RPM package can be downloaded from:
`dnf download --url {{package}}`

View File

@@ -11,3 +11,7 @@ source: https://github.com/tldr-pages/tldr.git
- Reconfigure one or more packages:
`dpkg-reconfigure {{package1 package2 ...}}`
- Reconfigure console font setup:
`dpkg-reconfigure console-setup`

View File

@@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git
- Set an arbitrary framebuffer mode:
`sudo fbset {{TTY_horizontal}} {{TTY_vertical}} {{monitor_horizontal}} {{monitor_vertical}} {{color_depth}}`
`sudo fbset {{[-g|--geometry]}} {{TTY_horizontal}} {{TTY_vertical}} {{monitor_horizontal}} {{monitor_vertical}} {{color_depth}}`

29
tldr/linux/fsadm Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# fsadm
> Check or resize a filesystem on a device.
> More information: <https://manned.org/fsadm>.
- Check a filesystem for errors:
`fsadm check {{/dev/vg_name/lv_name}}`
- Perform a dry-run resize to a specific size (no changes made):
`fsadm {{[-n|--dry-run]}} resize {{/dev/vg_name/lv_name}} {{10G}}`
- Grow a filesystem to fill the entire device (omit the size):
`fsadm resize {{/dev/vg_name/lv_name}}`
- Resize the filesystem and the underlying logical volume together:
`fsadm {{[-l|--lvresize]}} resize {{/dev/vg_name/lv_name}} {{100G}}`
- For ext2/3/4, unmount and resize offline:
`fsadm {{[-e|--ext-offline]}} resize {{/dev/vg_name/lv_name}} {{20G}}`

View File

@@ -18,11 +18,11 @@ source: https://github.com/tldr-pages/tldr.git
- Generate a ramdisk environment based on the `linux` preset:
`sudo mkinitcpio {{[-p|--preset]}} {{linux}}`
`sudo mkinitcpio {{[-p|--preset]}} linux`
- Generate a ramdisk environment based on the `linux-lts` preset:
`sudo mkinitcpio {{[-p|--preset]}} {{linux-lts}}`
`sudo mkinitcpio {{[-p|--preset]}} linux-lts`
- Generate an initramfs image using an alternative configuration file:

View File

@@ -11,7 +11,7 @@ source: https://github.com/tldr-pages/tldr.git
- Show version of httpd package:
`rpm {{[-q|--query]}} {{httpd}}`
`rpm {{[-q|--query]}} httpd`
- List versions of all matching packages:

21
tldr/linux/systemctl-edit Normal file
View File

@@ -0,0 +1,21 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# systemctl edit
> Edit systemd unit files.
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#edit%20UNIT%E2%80%A6>.
- Replace a unit file non-destructively:
`sudo systemctl edit {{unit_file}}`
- Edit an unit file:
`sudo systemctl edit {{[-l|--full]}} {{unit_file}}`
- Create a new unit file:
`sudo systemctl edit {{[-lf|--full --force]}} {{unit_file}}`

View File

@@ -17,6 +17,14 @@ source: https://github.com/tldr-pages/tldr.git
`mullvad lan set allow`
- Select a server in a specific city:
`mullvad relay set location {{se}} {{mma}}`
- Select a specific server:
`mullvad relay set location {{se-mma-wg-001}}`
- Establish the VPN tunnel:
`mullvad connect`

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> Query a variety of web search engines.
> Consists of a collection of elvi, each of which knows how to search a website.
> More information: <http://surfraw.org>.
> More information: <https://manned.org/surfraw>.
- Display the list of supported website search scripts (elvi):

12
tldr/vc Normal file
View File

@@ -0,0 +1,12 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# vc
> This command is an alias of `vercel`.
- View documentation for the original command:
`tldr vercel`

View File

@@ -24,13 +24,13 @@ source: https://github.com/tldr-pages/tldr.git
`vercel init`
- Deploy with Environment Variables:
- Deploy with environment variables:
`vercel --env {{ENV}}={{var}}`
`vercel {{[-e|--env]}} {{ENV}}={{var}}`
- Build with Environment Variables:
- Build with environment variables:
`vercel --build-env {{ENV}}={{var}}`
`vercel {{[-b|--build-env]}} {{ENV}}={{var}}`
- Set default regions to enable the deployment on: