System Grab Bag

View all TLDR pages from common (or from all pages)

gpg

GNU Privacy Guard. See gpg2 for GNU Privacy Guard 2. Most operating systems symlink gpg to gpg2. More information: https://gnupg.org.
  • Create a GPG public and private key interactively:
    gpg --full-generate-key
  • 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 --encrypt --sign --recipient {{[email protected]}} --recipient {{[email protected]}} {{doc.txt}}
  • Encrypt doc.txt with only a passphrase (output to doc.txt.gpg):
    gpg --symmetric {{doc.txt}}
  • Decrypt doc.txt.gpg (output to stdout):
    gpg --decrypt {{doc.txt.gpg}}
  • Import a public key:
    gpg --import {{public.gpg}}
  • Export public key for [email protected] (output to stdout):
    gpg --export --armor {{[email protected]}}
  • Export private key for [email protected] (output to stdout):
    gpg --export-secret-keys --armor {{[email protected]}}

License and Disclaimer

The content on this page is copyright © 2014—present the tldr-pages team and contributors.
This page is used with permission under Creative Commons Attribution 4.0 International License.

While we do attempt to make sure content is accurate, there isn't a warranty of any kind.