gpg Command Examples

GNU Privacy Guard. See gpg2 for GNU Privacy Guard 2. Most operating systems symlink gpg to gpg2. More information: https://gnupg.org.

gpg --full-generate-key

gpg --clearsign {{doc.txt}}

gpg --encrypt --sign --recipient {{alice@example.com}} --recipient {{bob@example.com}} {{doc.txt}}

gpg --symmetric {{doc.txt}}

gpg --decrypt {{doc.txt.gpg}}

gpg --import {{public.gpg}}

gpg --export --armor {{alice@example.com}}

gpg --export-secret-keys --armor {{alice@example.com}}