gpg Command Examples

GNU Privacy Guard, an OpenPGP encryption and signing tool. More information: https://gnupg.org/documentation/manuals/gnupg/Invoking-GPG.html.

gpg --full-generate-key

gpg {{[-k|--list-keys]}}

gpg --clearsign {{doc.txt}}

gpg {{[-es|--encrypt --sign]}} {{[-r|--recipient]}} {{alice@example.com}} {{[-r|--recipient]}} {{bob@example.com}} {{doc.txt}}

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

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

gpg --import {{public.gpg}}

gpg {{--export|--export-secret-keys}} {{[-a|--armor]}} {{alice@example.com}}