mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
Update cheatsheets
This commit is contained in:
25
tldr/gpg
25
tldr/gpg
@@ -5,38 +5,37 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# gpg
|
||||
|
||||
> GNU Privacy Guard.
|
||||
> See `gpg2` for GNU Privacy Guard 2. Most operating systems symlink `gpg` to `gpg2`.
|
||||
> More information: <https://gnupg.org>.
|
||||
> GNU Privacy Guard, an OpenPGP encryption and signing tool.
|
||||
> More information: <https://gnupg.org/documentation/manuals/gnupg/Invoking-GPG.html>.
|
||||
|
||||
- Create a GPG public and private key interactively:
|
||||
|
||||
`gpg --full-generate-key`
|
||||
|
||||
- List all keys from the public keyring:
|
||||
|
||||
`gpg {{[-k|--list-keys]}}`
|
||||
|
||||
- Sign `doc.txt` without encryption (writes output to `doc.txt.asc`):
|
||||
|
||||
`gpg --clearsign {{doc.txt}}`
|
||||
|
||||
- Encrypt and sign `doc.txt` for alice@example.com and bob@example.com (output to `doc.txt.gpg`):
|
||||
- Encrypt and sign `doc.txt` for `alice@example.com` and `bob@example.com` (output to `doc.txt.gpg`):
|
||||
|
||||
`gpg --encrypt --sign --recipient {{alice@example.com}} --recipient {{bob@example.com}} {{doc.txt}}`
|
||||
`gpg {{[-es|--encrypt --sign]}} {{[-r|--recipient]}} {{alice@example.com}} {{[-r|--recipient]}} {{bob@example.com}} {{doc.txt}}`
|
||||
|
||||
- Encrypt `doc.txt` with only a passphrase (output to `doc.txt.gpg`):
|
||||
|
||||
`gpg --symmetric {{doc.txt}}`
|
||||
`gpg {{[-c|--symmetric]}} {{doc.txt}}`
|
||||
|
||||
- Decrypt `doc.txt.gpg` (output to `stdout`):
|
||||
|
||||
`gpg --decrypt {{doc.txt.gpg}}`
|
||||
`gpg {{[-d|--decrypt]}} {{doc.txt.gpg}}`
|
||||
|
||||
- Import a public key:
|
||||
|
||||
`gpg --import {{public.gpg}}`
|
||||
|
||||
- Export public key for alice@example.com (output to `stdout`):
|
||||
- Export the public/private key for `alice@example.com` (output to `stdout`):
|
||||
|
||||
`gpg --export --armor {{alice@example.com}}`
|
||||
|
||||
- Export private key for alice@example.com (output to `stdout`):
|
||||
|
||||
`gpg --export-secret-keys --armor {{alice@example.com}}`
|
||||
`gpg {{--export|--export-secret-keys}} {{[-a|--armor]}} {{alice@example.com}}`
|
||||
|
||||
32
tldr/gpg2
32
tldr/gpg2
@@ -5,34 +5,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# gpg2
|
||||
|
||||
> GNU Privacy Guard 2.
|
||||
> See `gpg` for GNU Privacy Guard 1.
|
||||
> More information: <https://docs.releng.linuxfoundation.org/en/latest/gpg.html>.
|
||||
> This command is an alias of `gpg`.
|
||||
|
||||
- List imported keys:
|
||||
- View documentation for the original command:
|
||||
|
||||
`gpg2 --list-keys`
|
||||
|
||||
- Encrypt a specified file for a specified recipient, writing the output to a new file with `.gpg` appended:
|
||||
|
||||
`gpg2 --encrypt --recipient {{alice@example.com}} {{path/to/doc.txt}}`
|
||||
|
||||
- Encrypt a specified file with only a passphrase, writing the output to a new file with `.gpg` appended:
|
||||
|
||||
`gpg2 --symmetric {{path/to/doc.txt}}`
|
||||
|
||||
- Decrypt a specified file, writing the result to `stdout`:
|
||||
|
||||
`gpg2 --decrypt {{path/to/doc.txt.gpg}}`
|
||||
|
||||
- Import a public key:
|
||||
|
||||
`gpg2 --import {{path/to/public_key.gpg}}`
|
||||
|
||||
- Export the public key of a specified email address to `stdout`:
|
||||
|
||||
`gpg2 --export --armor {{alice@example.com}}`
|
||||
|
||||
- Export the private key with a specified email address to `stdout`:
|
||||
|
||||
`gpg2 --export-secret-keys --armor {{alice@example.com}}`
|
||||
`tldr gpg`
|
||||
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo apt update`
|
||||
|
||||
- Search for a given package:
|
||||
- Search for a given package (use `apt search -n package` to search within package name only):
|
||||
|
||||
`apt search {{package}}`
|
||||
|
||||
|
||||
@@ -6,24 +6,28 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# smartctl
|
||||
|
||||
> Monitor disk health including SMART data.
|
||||
> More information: <https://www.smartmontools.org>.
|
||||
> More information: <https://manned.org/smartctl>.
|
||||
|
||||
- Display SMART health summary:
|
||||
|
||||
`sudo smartctl --health {{/dev/sdX}}`
|
||||
`sudo smartctl {{[-H|--health]}} {{/dev/sdX}}`
|
||||
|
||||
- Display device information:
|
||||
|
||||
`sudo smartctl --info {{/dev/sdX}}`
|
||||
`sudo smartctl {{[-i|--info]}} {{/dev/sdX}}`
|
||||
|
||||
- Start a short self-test in the background:
|
||||
- Start a short/long self-test in the background:
|
||||
|
||||
`sudo smartctl --test short {{/dev/sdX}}`
|
||||
`sudo smartctl {{[-t|--test]}} {{short|long}} {{/dev/sdX}}`
|
||||
|
||||
- Display the self-test log:
|
||||
|
||||
`sudo smartctl {{[-l|--log]}} selftest`
|
||||
|
||||
- Display current/last self-test status and other SMART capabilities:
|
||||
|
||||
`sudo smartctl --capabilities {{/dev/sdX}}`
|
||||
`sudo smartctl {{[-c|--capabilities]}} {{/dev/sdX}}`
|
||||
|
||||
- Display exhaustive SMART data:
|
||||
|
||||
`sudo smartctl --all {{/dev/sdX}}`
|
||||
`sudo smartctl {{[-a|--all]}} {{/dev/sdX}}`
|
||||
|
||||
@@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`{{bash}} <Enter> suspend`
|
||||
|
||||
- Run in a separate terminal to continue from suspension if `suspend` was used in a non-nested shell:
|
||||
- Continue from suspension if `suspend` was used in a non-nested shell (run this in a separate terminal):
|
||||
|
||||
`pkill -CONT bash`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user