Update cheatsheets

This commit is contained in:
ivuorinen
2025-10-19 00:22:04 +00:00
parent aa594e72af
commit 9c64f72b0c
25 changed files with 607 additions and 3 deletions

30
tldr/linux/cliphist Normal file
View File

@@ -0,0 +1,30 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# cliphist
> Manage clipboard history for Wayland compositors.
> Works with `wl-copy` and `wl-paste`.
> More information: <https://github.com/sentriz/cliphist>.
- List clipboard history entries:
`cliphist list`
- Select and copy a previous clipboard entry (using `fzf`):
`cliphist list | fzf | cliphist decode | wl-copy`
- Delete all stored clipboard entries:
`cliphist wipe`
- Delete a specific clipboard entry by ID:
`cliphist delete {{id}}`
- Save the current clipboard content manually:
`wl-paste | cliphist store`

35
tldr/linux/dnf-reposync Normal file
View File

@@ -0,0 +1,35 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# dnf reposync
> Synchronize packages and metadata of a remote DNF repository to a local directory.
> Not default to `dnf` but supported via `dnf-plugins-core`.
> See also: `dnf`.
> More information: <https://dnf-plugins-core.readthedocs.io/en/latest/reposync.html>.
- Synchronize all packages from the repository with id `repo_name` to a subdirectory `repo_name` of the current working directory:
`dnf reposync --repoid {{repo_name}}`
- Synchronize all packages and define a custom save location:
`dnf reposync --repoid {{repo_name}} {{[-p|--download-path]}} {{path/to/directory}}`
- Synchronize all packages and metadata:
`dnf reposync --repoid {{repo_name}} --download-metadata`
- Download only newest packages per-repo:
`dnf reposync --repoid {{repo_name}} {{[-n|--newest-only]}}`
- Just print URLs of what would be downloaded, dont download:
`dnf reposync --repoid {{repo_name}} {{[-u|--urls]}}`
- Try to set the timestamps of the downloaded files to those on the remote side:
`dnf reposync --repoid {{repo_name}} --remote-time`

34
tldr/linux/limine Normal file
View File

@@ -0,0 +1,34 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# limine
> An advanced, portable, multiprotocol bootloader.
> See also: `limine-enroll-config`, `limine-entry-tool`, `limine-snapper-sync`.
> More information: <https://codeberg.org/Limine/Limine>.
- Install Limine to an MBR-partitioned disk:
`limine bios-install {{/dev/sdX}}`
- Install Limine to a GPT-partitioned disk with a specific BIOS boot partition:
`limine bios-install {{/dev/sdX}} {{partition_number}}`
- Install Limine to a disk image file:
`limine bios-install {{path/to/image.iso}}`
- Install Limine for modern UEFI systems (requires the `limine-entry-tool` package):
`limine-install`
- Update boot entries after a kernel upgrade (requires the `limine-entry-tool` package):
`limine-update`
- Scan for other operating systems to add to the boot menu (requires the `limine-entry-tool` package):
`limine-scan`

View File

@@ -0,0 +1,22 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# limine-enroll-config
> Embed or reset the BLAKE2B hash of `limine.conf` in the Limine EFI executable.
> Used to ensure the configuration file has not been tampered with when Secure Boot is enabled.
> More information: <https://codeberg.org/Limine/Limine/src/branch/trunk/USAGE.md#secure-boot>.
- Embed a config file's BLAKE2B hash into the Limine EFI executable:
`limine-enroll-config {{path/to/BOOTX64.EFI}} {{blake2b_hash}}`
- Remove the enrolled hash from the executable, disabling the config integrity check:
`limine-enroll-config --reset {{path/to/BOOTX64.EFI}}`
- Display help:
`limine-enroll-config --help`

View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# limine-entry-tool
> A helper script to manage Limine bootloader entries on UEFI systems.
> More information: <https://gitlab.com/Zesko/limine-entry-tool>.
- Scan for other active UEFI boot entries and add them to the Limine menu:
`limine-entry-tool --scan`
- Add a new kernel boot entry with an initramfs and a kernel file:
`limine-entry-tool --add "{{kernel_name}}" "{{path/to/initramfs}}" "{{path/to/vmlinuz}}"`
- Add a new Unified Kernel Image (UKI) boot entry:
`limine-entry-tool --add-uki "{{kernel_name}}" "{{path/to/uki.efi}}"`
- Remove a kernel boot entry and its associated files from the ESP:
`limine-entry-tool --remove "{{kernel_name}}"`
- Remove an entire OS entry by its name or machine ID:
`limine-entry-tool --remove-os "{{OS_name|machine_id}}"`
- Add an EFI boot entry for an alternative bootloader (e.g., Windows):
`limine-entry-tool --add-efi "{{EFI_entry_name}}" "{{path/to/loader.efi}}"`

12
tldr/linux/limine-scan Normal file
View File

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

View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# limine-snapper-sync
> Synchronize Limine boot menu entries with Btrfs snapshots managed by Snapper.
> More information: <https://gitlab.com/Zesko/limine-snapper-sync>.
- Manually synchronize Snapper snapshots to create boot entries in Limine:
`limine-snapper-sync`
- List the current snapshot entries managed by Limine:
`limine-snapper-list`
- Display detailed information about bootable snapshots and their files:
`limine-snapper-info`
- Restore the system from a selected bootable snapshot:
`limine-snapper-restore`
- Start the watcher process to monitor for Snapper snapshot changes:
`limine-snapper-watcher`

29
tldr/linux/mhwd-kernel Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# mhwd-kernel
> Manage and install Linux kernels in Manjaro.
> More information: <https://wiki.manjaro.org/index.php/Manjaro_Kernels>.
- List all available kernels:
`mhwd-kernel {{[-l|--list]}}`
- List all installed kernels:
`mhwd-kernel {{[-li|--listinstalled]}}`
- Install a kernel:
`sudo mhwd-kernel {{[-i|--install]}} {{kernel}}`
- Remove a kernel:
`sudo mhwd-kernel {{[-r|--remove]}} {{kernel}}`
- Install a kernel, replacing the currently running kernel:
`sudo mhwd-kernel {{[-i|--install]}} {{kernel}} rmc`

29
tldr/linux/pw-container Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# pw-container
> Run a program in a new security context.
> More information: <https://docs.pipewire.org/page_man_pw-container_1.html>.
- Create a new security context and print its socket address to `stdout`:
`pw-container`
- Run a specific program within a new security context:
`pw-container {{command}} {{argument1 argument2 ...}}`
- Run a program, connecting to a specific remote PipeWire instance:
`pw-container {{[-r|--remote]}} {{remote_instance_name}} {{command}}`
- Run a program in a new context with specific properties using a JSON object:
`pw-container {{[-P|--properties]}} '{{{"key": "value"}}}' {{command}}`
- Display help:
`pw-container {{[-h|--help]}}`

View File

@@ -0,0 +1,21 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# systemctl set-default
> Symlink the `default.target` alias to the given target unit.
> More information: <https://www.freedesktop.org/software/systemd/man/systemctl.html#set-default%20TARGET>.
- Set `systemd`'s default boot mode:
`systemctl set-default {{target_name.target}}`
- Set `systemd` to boot to GUI mode by default:
`systemctl set-default graphical.target`
- Set `systemd` to boot to CLI mode by default:
`systemctl set-default multi-user.target`