commands.sh

gpg

all

GNU Privacy Guard, an OpenPGP encryption and signing tool. See also: `sq`.

More info →

Options (7)

--full-gen-keyboolean

Create a GPG public and private key interactively

Example: gpg {{[--full-gen-key|--full-generate-key]}}
-k, --list-keysboolean

List all keys from the public keyring

Example: gpg {{[-k|--list-keys]}}
boolean

Encrypt and sign `doc.txt` for `[email protected]` and `[email protected]` (output to `doc.txt.gpg`)

Example: gpg {{[-es|--encrypt --sign]}} {{[-r|--recipient]}} {{[email protected]}} {{[-r|--recipient]}} {{[email protected]}} {{doc.txt}}
-r, --recipientboolean

Encrypt and sign `doc.txt` for `[email protected]` and `[email protected]` (output to `doc.txt.gpg`)

Example: gpg {{[-es|--encrypt --sign]}} {{[-r|--recipient]}} {{[email protected]}} {{[-r|--recipient]}} {{[email protected]}} {{doc.txt}}
-c, --symmetricboolean

Encrypt `doc.txt` with only a passphrase (output to `doc.txt.gpg`)

Example: gpg {{[-c|--symmetric]}} {{doc.txt}}
-d, --decryptboolean

Decrypt `doc.txt.gpg` (output to `stdout`)

Example: gpg {{[-d|--decrypt]}} {{doc.txt.gpg}}
-a, --armorboolean

Export the public/private key for `[email protected]` (output to `stdout`)

Example: gpg {{--export|--export-secret-keys}} {{[-a|--armor]}} {{[email protected]}}

Examples (8)

Create a GPG public and private key interactively

gpg [--full-gen-key|--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 `[email protected]` and `[email protected]` (output to `doc.txt.gpg`)

gpg [-es|--encrypt --sign] [-r|--recipient] [email protected] [-r|--recipient] [email protected] doc.txt

Encrypt `doc.txt` with only a passphrase (output to `doc.txt.gpg`)

gpg [-c|--symmetric] doc.txt

Decrypt `doc.txt.gpg` (output to `stdout`)

gpg [-d|--decrypt] doc.txt.gpg

Import a public key

gpg --import public.gpg

Export the public/private key for `[email protected]` (output to `stdout`)

gpg --export|--export-secret-keys [-a|--armor] [email protected]
made by @shridhargupta | data from tldr-pages