gpg
GNU Privacy Guard. Seegpg2
for GNU Privacy Guard 2. Most operating systems symlinkgpg
togpg2
. More information: https://gnupg.org.
-
Create a GPG public and private key interactively:
gpg --full-generate-key
-
Sign
doc.txt
without encryption (writes output todoc.txt.asc
):
gpg --clearsign {{doc.txt}}
-
Encrypt and sign
doc.txt
for [email protected] and [email protected] (output todoc.txt.gpg
):
gpg --encrypt --sign --recipient {{[email protected]}} --recipient {{[email protected]}} {{doc.txt}}
-
Encrypt
doc.txt
with 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.