From c8f70230297a73187379958037b378432ae2b1c2 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Sun, 12 Oct 2025 00:20:06 +0000 Subject: [PATCH] Update cheatsheets --- tldr/crane | 4 ++-- tldr/eim | 41 +++++++++++++++++++++++++++++++++ tldr/komac | 16 ++++++------- tldr/linux/pacconf | 33 ++++++++++++++++++++++++++ tldr/linux/pacfile | 25 ++++++++++++++++++++ tldr/linux/pacrepairfile | 29 +++++++++++++++++++++++ tldr/linux/semanage-user | 38 ++++++++++++++++++++++++++++++ tldr/linux/systemctl-preset-all | 26 +++++++++++++++++++++ tldr/talostcl | 34 +++++++++++++++++++++++++++ 9 files changed, 236 insertions(+), 10 deletions(-) create mode 100644 tldr/eim create mode 100644 tldr/linux/pacconf create mode 100644 tldr/linux/pacfile create mode 100644 tldr/linux/pacrepairfile create mode 100644 tldr/linux/semanage-user create mode 100644 tldr/linux/systemctl-preset-all create mode 100644 tldr/talostcl diff --git a/tldr/crane b/tldr/crane index c1cd80f2..2530609f 100644 --- a/tldr/crane +++ b/tldr/crane @@ -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: diff --git a/tldr/eim b/tldr/eim new file mode 100644 index 00000000..ff997fa4 --- /dev/null +++ b/tldr/eim @@ -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: . + +- 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}}` diff --git a/tldr/komac b/tldr/komac index 78edc14b..0d361007 100644 --- a/tldr/komac +++ b/tldr/komac @@ -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}}` diff --git a/tldr/linux/pacconf b/tldr/linux/pacconf new file mode 100644 index 00000000..a886dfa6 --- /dev/null +++ b/tldr/linux/pacconf @@ -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: . + +- 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` diff --git a/tldr/linux/pacfile b/tldr/linux/pacfile new file mode 100644 index 00000000..ab7d798d --- /dev/null +++ b/tldr/linux/pacfile @@ -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: . + +- List all available packages: + +`pacfile` + +- Compare database values to the file system: + +`pacfile --check` + +- Display help: + +`pacfile --help` + +- Display version: + +`pacfile --version` diff --git a/tldr/linux/pacrepairfile b/tldr/linux/pacrepairfile new file mode 100644 index 00000000..3a6bfed0 --- /dev/null +++ b/tldr/linux/pacrepairfile @@ -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: . + +- 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` diff --git a/tldr/linux/semanage-user b/tldr/linux/semanage-user new file mode 100644 index 00000000..96d177b6 --- /dev/null +++ b/tldr/linux/semanage-user @@ -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: . + +- 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]}}` diff --git a/tldr/linux/systemctl-preset-all b/tldr/linux/systemctl-preset-all new file mode 100644 index 00000000..1e1a3c31 --- /dev/null +++ b/tldr/linux/systemctl-preset-all @@ -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: . + +- 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]}}` diff --git a/tldr/talostcl b/tldr/talostcl new file mode 100644 index 00000000..410f7f89 --- /dev/null +++ b/tldr/talostcl @@ -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: . + +- 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}}`