gpg
GNU Privacy Guard. Seegpg2for GNU Privacy Guard 2. Most operating systems symlinkgpgtogpg2. More information: https://gnupg.org.
-
Create a GPG public and private key interactively:
gpg --full-generate-key -
Sign
doc.txtwithout encryption (writes output todoc.txt.asc):
gpg --clearsign {{doc.txt}} -
Encrypt and sign
doc.txtfor [email protected] and [email protected] (output todoc.txt.gpg):
gpg --encrypt --sign --recipient {{[email protected]}} --recipient {{[email protected]}} {{doc.txt}} -
Encrypt
doc.txtwith only a passphrase (output todoc.txt.gpg):
gpg --symmetric {{doc.txt}} -
Decrypt
doc.txt.gpg(output tostdout):
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.