gpg2
GnuPG 2 encryption and digital signatures
TLDR
Generate key pair
SYNOPSIS
gpg2 [options] [files]
DESCRIPTION
gpg2 (GnuPG 2) is the modern version of GNU Privacy Guard, implementing the OpenPGP standard for encryption, digital signatures, and key management. It uses a modular architecture with separate daemons for improved security.
On most modern systems, gpg is aliased to gpg2. The two share keyrings and are functionally equivalent, with gpg2 offering improved architecture and daemon management.
PARAMETERS
-e, --encrypt
Encrypt data.-d, --decrypt
Decrypt data.-s, --sign
Sign data.--verify
Verify signature.-r, --recipient name
Encrypt for recipient.-a, --armor
ASCII armored output.--gen-key, --full-generate-key
Generate key pair.--list-keys
List public keys.--list-secret-keys
List private keys.--export keyid
Export public key.--import file
Import keys.--keyserver server
Keyserver to use.
CONFIGURATION
~/.gnupg/gpg.conf
User configuration file for default options, preferred algorithms, and keyserver settings.~/.gnupg/gpg-agent.conf
Configuration for the gpg-agent daemon handling passphrase caching and key operations.
CAVEATS
Key management requires understanding of web of trust. Private keys must be protected. Passphrase selection is critical. gpg and gpg2 share keyrings on modern systems.
HISTORY
GnuPG was created by Werner Koch in 1997 as a free replacement for PGP. GPG 2.0 was released in 2006 with a modular architecture. It's a fundamental tool for secure email and software signing.
