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

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]}}`