Update cheatsheets

This commit is contained in:
ivuorinen
2025-03-12 00:18:03 +00:00
parent 4ed84edbe1
commit ffbd8c31db
29 changed files with 244 additions and 70 deletions

View File

@@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git
- Edit a file as the superuser with your default editor:
`sudo --edit {{/etc/fstab}}`
`sudo {{[-e|--edit]}} {{/etc/fstab}}`
- Run a command as another user and/or group:
`sudo --user={{user}} --group={{group}} {{id -a}}`
`sudo {{[-u|--user]}} {{user}} {{[-g|--group]}} {{group}} {{id -a}}`
- Repeat the last command prefixed with `sudo` (only in Bash, Zsh, etc.):
@@ -26,16 +26,16 @@ source: https://github.com/tldr-pages/tldr.git
- Launch the default shell with superuser privileges and run login-specific files (`.profile`, `.bash_profile`, etc.):
`sudo --login`
`sudo {{[-i|--login]}}`
- Launch the default shell with superuser privileges without changing the environment:
`sudo --shell`
`sudo {{[-s|--shell]}}`
- Launch the default shell as the specified user, loading the user's environment and reading login-specific files (`.profile`, `.bash_profile`, etc.):
`sudo --login --user={{user}}`
`sudo {{[-i|--login]}} {{[-u|--user]}} {{user}}`
- List the allowed (and forbidden) commands for the invoking user:
`sudo --list`
`sudo {{[-l|--list]}}`