gpg

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

Install

All systems
curl cmd.cat/gpg.sh
Debian Debian
apt-get install gpg
Ubuntu
apt-get install gpg
Alpine
apk add gnupg
Arch Arch Linux
pacman -S gnupg
image/svg+xml Kali Linux
apt-get install gpg
CentOS
yum install gnupg2
Fedora
dnf install gnupg
Windows (WSL2)
sudo apt-get update sudo apt-get install gpg
OS X
brew install gnupg
Raspbian
apt-get install gnupg
Docker
docker run cmd.cat/gpg gpg powered by Commando

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]

© tl;dr; authors and contributors