Update cheatsheets

This commit is contained in:
ivuorinen
2025-10-12 00:20:06 +00:00
parent d185573d5d
commit c8f7023029
9 changed files with 236 additions and 10 deletions

View File

@@ -33,9 +33,9 @@ source: https://github.com/tldr-pages/tldr.git
`crane tag {{image}} {{tag}}`
- Efficiently copy a remote image from src to dst while retaining the digest value:
- Efficiently copy a remote image from `src` to `dst` while retaining the digest value:
`crane copy {{src}} {{dst}} {{[-a|--all-tags]}}`
`crane copy src dst {{[-a|--all-tags]}}`
- Delete an image reference from its registry:

41
tldr/eim Normal file
View File

@@ -0,0 +1,41 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# eim
> Install and manage ESP-IDF.
> More information: <https://docs.espressif.com/projects/idf-im-ui/en/latest/cli_commands.html>.
- Install the default (latest) ESP-IDF version in the default location (`C:sp` on Windows and `~/.espressif` on POSIX systems):
`eim install`
- Install a specific ESP-IDF version:
`eim install {{[-i|--idf-versions]}} {{v5.3.2}}`
- Run the interactive, guided installation wizard:
`eim wizard`
- Install a specific version to a custom path, forcing interactive mode (to prompt for choices):
`eim install {{[-i|--idf-versions]}} {{v5.3.2}} {{[-p|--path]}} {{/opt/esp-idf}} {{[-n|--non-interactive]}} false`
- List all currently installed ESP-IDF versions:
`eim list`
- Remove a specific installed ESP-IDF version:
`eim remove {{v5.3.2}}`
- Install in headless mode using all options defined in a TOML configuration file:
`eim install {{[-c|--config]}} {{path/to/config.toml}}`
- Install offline using a pre-downloaded archive file:
`eim install --use-local-archive {{path/to/archive.zst}}`

View File

@@ -10,32 +10,32 @@ source: https://github.com/tldr-pages/tldr.git
- Create a new package from scratch:
`komac new {{Package.Identifier}} --version {{1.2.3}} --urls {{https://example.com/app.exe}}`
`komac new {{Package.Identifier}} {{[-v|--version]}} {{1.2.3}} {{[-u|--urls]}} {{https://example.com/app.exe}}`
- Update an existing package with a new version:
`komac update {{Package.Identifier}} --version {{1.2.3}} --urls {{https://example.com/app.exe}}`
`komac update {{Package.Identifier}} {{[-v|--version]}} {{1.2.3}} {{[-u|--urls]}} {{https://example.com/app.exe}}`
- Update a package with multiple URLs and automatically submit:
`komac update {{Package.Identifier}} --version {{1.2.3}} --urls {{https://example.com/app.exe https://example.com/app.msi ...}} --submit`
`komac update {{Package.Identifier}} {{[-v|--version]}} {{1.2.3}} {{[-u|--urls]}} {{https://example.com/app.exe https://example.com/app.msi ...}} {{[-s|--submit]}}`
- Remove a version from winget-pkgs:
`komac remove {{Package.Identifier}} --version {{1.2.3}}`
`komac remove {{Package.Identifier}} {{[-v|--version]}} {{1.2.3}}`
- List all versions for a package:
`komac list-versions {{Package.Identifier}}`
`komac {{[list|list-versions]}} {{Package.Identifier}}`
- Sync your fork of winget-pkgs with the upstream repository:
`komac sync-fork`
`komac {{[sync|sync-fork]}}`
- Update the stored GitHub token:
`komac token update --token {{your_github_token}}`
`komac token {{[add|update]}} {{[-t|--token]}} {{your_github_token}}`
- Generate shell autocompletion script:
`komac complete {{bash|zsh|fish|powershell}}`
`komac {{[complete|autocomplete]}} {{bash|elvish|fish|powershell|zsh}}`

33
tldr/linux/pacconf Normal file
View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# pacconf
> Query and display pacman's configuration options, showing either the full configuration or specific directive values as parsed by pacman.
> More information: <https://github.com/andrewgregory/pacutils/blob/master/doc/pacconf.pod>.
- Show full parsed pacman configuration:
`pacconf`
- List configured repositories:
`pacconf --repo-list`
- Always show directive names even if only one directive is provided:
`pacconf --verbose {{directive}}`
- Display only first value of multi-value options:
`pacconf --single`
- Display help:
`pacconf --help`
- Display version:
`pacconf --version`

25
tldr/linux/pacfile Normal file
View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# pacfile
> Display information about package files, including repository data, file system checks, and database comparisons.
> More information: <https://github.com/andrewgregory/pacutils/blob/master/doc/pacfile.pod>.
- List all available packages:
`pacfile`
- Compare database values to the file system:
`pacfile --check`
- Display help:
`pacfile --help`
- Display version:
`pacfile --version`

29
tldr/linux/pacrepairfile Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# pacrepairfile
> Reset properties on files managed by alpm.
> More information: <https://github.com/andrewgregory/pacutils/blob/master/doc/pacrepairfile.pod>.
- Search for the package and reset the properties of a file:
`pacrepairfile {{path/to/file}} --package`
- Reset a file quietly:
`pacrepairfile {{package_name}} --quiet --package`
- Reset specific file properties (mode, owner UID, group GID, or modification time):
`pacrepairfile {{package_name}} --{{mode|gid|mtime|uid}} --package`
- Display help:
`pacrepairfile --help`
- Display version:
`pacrepairfile --version`

38
tldr/linux/semanage-user Normal file
View File

@@ -0,0 +1,38 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# semanage-user
> Manage SELinux user mappings.
> See also: `semanage`, `semanage-login`.
> More information: <https://manned.org/semanage-user>.
- List all SELinux users:
`sudo semanage user {{[-l|--list]}}`
- Add a new SELinux user:
`sudo semanage user {{[-a|--add]}} {{[-R|--roles]}} {{role_name}} {{selinux_user}}`
- Delete a SELinux user:
`sudo semanage user {{[-d|--delete]}} {{selinux_user}}`
- Modify an existing SELinux user's roles:
`sudo semanage user {{[-m|--modify]}} {{[-R|--roles]}} {{role_name}} {{selinux_user}}`
- Add a SELinux user with a specific default level:
`sudo semanage user {{[-a|--add]}} {{[-R|--roles]}} {{role_name}} {{[-L|--level]}} {{s0}} {{selinux_user}}`
- Add a SELinux user with a specific MLS/MCS range:
`sudo semanage user {{[-a|--add]}} {{[-R|--roles]}} {{role_name}} {{[-r|--range]}} {{s0-s0:c0.c1023}} {{selinux_user}}`
- List only customized SELinux users:
`sudo semanage user {{[-l|--list]}} {{[-C|--locallist]}}`

View File

@@ -0,0 +1,26 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# systemctl preset-all
> Reset the enablement state of all installed units to the defaults specified in preset policy files.
> See also: `systemctl preset`, `systemctl list-unit-files`.
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#preset-all>.
- Reset the enablement state of all installed units:
`sudo systemctl preset-all`
- Enable only if marked as enabled in the preset policy:
`sudo systemctl preset-all --preset-mode enable-only`
- Disable only if marked as disabled in the preset policy:
`sudo systemctl preset-all --preset-mode disable-only`
- Suppress output and return only the exit code:
`sudo systemctl preset-all {{[-q|--quiet]}}`

34
tldr/talostcl Normal file
View File

@@ -0,0 +1,34 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# talosctl
> Interact with Talos Linux, a minimal and immutable Kubernetes distribution.
> See also: `kubectl`.
> More information: <https://www.talos.dev/latest/reference/cli/>.
- Apply a config to a fresh node:
`talosctl apply-config {{[-i|--insecture]}} {{[-n|--nodes]}} {{control_plane_ip}} {{[-f|--file]}} {{path/to/control_plane.yaml}}`
- Bootstrap the `etcd` cluster on a node:
`talosctl bootstrap {{[-n|--nodes]}} {{node_ip}}`
- Edit an API resource:
`talosctl edit {{resource_to_edit}} {{[-n|--nodes]}} {{node_ip}}`
- Get resources:
`talosctl get {{resource_to_get}} {{[-n|--nodes]}} {{node_ip}}`
- Download the admin kube configuration from a node:
`talosctl kubeconfig {{[-n|--nodes]}} {{node_ip}}`
- Reset a node:
`talosctl reset {{[-n|--nodes]}} {{node_ip}}`