OS Manuals

/usr/bin/gpg2

GNU Privacy Guard 2 - public key operations only

From gpg-fips 2.4.9-r13 (enterprise-packages), captured 2026-11-08 by running gpg2 --help (exit 0). permalink

gpg: out of core handler ignored in FIPS mode
gpg (GnuPG) 2.4.9
libgcrypt 1.10.2-unknown
Copyright (C) 2025 g10 Code GmbH
License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /tmp/.gnupg
Supported algorithms:
Pubkey: RSA, ECDH, ECDSA, EDDSA
Cipher: AES, AES192, AES256
Hash: SHA1, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2

Syntax: gpg [options] [files]
Sign, check, encrypt or decrypt
Default operation depends on the input data

Commands:

 -s, --sign                         make a signature
     --clear-sign                   make a clear text signature
 -b, --detach-sign                  make a detached signature
 -e, --encrypt                      encrypt data
 -c, --symmetric                    encryption only with symmetric cipher
 -d, --decrypt                      decrypt data (default)
     --verify                       verify a signature
 -k, --list-keys                    list keys
     --list-signatures              list keys and signatures
     --check-signatures             list and check key signatures
     --fingerprint                  list keys and fingerprints
 -K, --list-secret-keys             list secret keys
     --generate-key                 generate a new key pair
     --quick-generate-key           quickly generate a new key pair
     --quick-add-uid                quickly add a new user-id
     --quick-revoke-uid             quickly revoke a user-id
     --quick-set-expire             quickly set a new expiration date
     --full-generate-key            full featured key pair generation
     --generate-revocation          generate a revocation certificate
     --delete-keys                  remove keys from the public keyring
     --delete-secret-keys           remove keys from the secret keyring
     --quick-sign-key               quickly sign a key
     --quick-lsign-key              quickly sign a key locally
     --quick-revoke-sig             quickly revoke a key signature
     --sign-key                     sign a key
     --lsign-key                    sign a key locally
     --edit-key                     sign or edit a key
     --change-passphrase            change a passphrase
     --export                       export keys
     --send-keys                    export keys to a keyserver
     --receive-keys                 import keys from a keyserver
     --search-keys                  search for keys on a keyserver
     --refresh-keys                 update all keys from a keyserver
     --import                       import/merge keys
     --card-status                  print the card status
     --edit-card                    change data on a card
     --change-pin                   change a card's PIN
     --update-trustdb               update the trust database
     --print-md                     print message digests
     --server                       run in server mode
     --tofu-policy VALUE            set the TOFU policy for a key

Options controlling the diagnostic output:
 -v, --verbose                      verbose
 -q, --quiet                        be somewhat more quiet
     --options FILE                 read options from FILE
     --log-file FILE                write server mode logs to FILE

Options controlling the configuration:
     --default-key NAME             use NAME as default secret key
     --encrypt-to NAME              encrypt to user ID NAME as well
     --group SPEC                   set up email aliases
     --openpgp                      use strict OpenPGP behavior
 -n, --dry-run                      do not make any changes
 -i, --interactive                  prompt before overwriting

Options controlling the output:
 -a, --armor                        create ascii armored output
 -o, --output FILE                  write output to FILE
 -z N                               set compress level to N (0 disables)

Options controlling key import and export:
     --auto-key-locate MECHANISMS   use MECHANISMS to locate keys by mail address
     --auto-key-import              import missing key from a signature
     --include-key-block            include the public key in signatures
     --disable-dirmngr              disable all access to the dirmngr

Options to specify keys:
 -r, --recipient USER-ID            encrypt for USER-ID
 -u, --local-user USER-ID           use USER-ID to sign or decrypt

(See the man page for a complete listing of all commands and options)

Examples:

 -se -r Bob [file]          sign and encrypt for user Bob
 --clear-sign [file]        make a clear text signature
 --detach-sign [file]       make a detached signature
 --list-keys [names]        show keys
 --fingerprint [names]      show fingerprints

Please report bugs to <https://bugs.gnupg.org>.
Options (61)
OptionDescriptionSource
-s, --signmake a signaturehelp
--clear-signmake a clear text signaturehelp
-b, --detach-signmake a detached signaturehelp
-e, --encryptencrypt datahelp
-c, --symmetricencryption only with symmetric cipherhelp
-d, --decryptdecrypt data (default)help
--verifyverify a signaturehelp
-k, --list-keyslist keyshelp
--list-signatureslist keys and signatureshelp
--check-signatureslist and check key signatureshelp
--fingerprintlist keys and fingerprintshelp
-K, --list-secret-keyslist secret keyshelp
--generate-keygenerate a new key pairhelp
--quick-generate-keyquickly generate a new key pairhelp
--quick-add-uidquickly add a new user-idhelp
--quick-revoke-uidquickly revoke a user-idhelp
--quick-set-expirequickly set a new expiration datehelp
--full-generate-keyfull featured key pair generationhelp
--generate-revocationgenerate a revocation certificatehelp
--delete-keysremove keys from the public keyringhelp
--delete-secret-keysremove keys from the secret keyringhelp
--quick-sign-keyquickly sign a keyhelp
--quick-lsign-keyquickly sign a key locallyhelp
--quick-revoke-sigquickly revoke a key signaturehelp
--sign-keysign a keyhelp
--lsign-keysign a key locallyhelp
--edit-keysign or edit a keyhelp
--change-passphrasechange a passphrasehelp
--exportexport keyshelp
--send-keysexport keys to a keyserverhelp
--receive-keysimport keys from a keyserverhelp
--search-keyssearch for keys on a keyserverhelp
--refresh-keysupdate all keys from a keyserverhelp
--importimport/merge keyshelp
--card-statusprint the card statushelp
--edit-cardchange data on a cardhelp
--change-pinchange a card's PINhelp
--update-trustdbupdate the trust databasehelp
--print-mdprint message digestshelp
--serverrun in server modehelp
--tofu-policy VALUEset the TOFU policy for a keyhelp
-v, --verboseverbosehelp
-q, --quietbe somewhat more quiethelp
--options FILEread options from FILEhelp
--log-file FILEwrite server mode logs to FILEhelp
--default-key NAMEuse NAME as default secret keyhelp
--encrypt-to NAMEencrypt to user ID NAME as wellhelp
--group SPECset up email aliaseshelp
--openpgpuse strict OpenPGP behaviorhelp
-n, --dry-rundo not make any changeshelp
-i, --interactiveprompt before overwritinghelp
-a, --armorcreate ascii armored outputhelp
-o, --output FILEwrite output to FILEhelp
-z Nset compress level to N (0 disables)help
--auto-key-locate MECHANISMSuse MECHANISMS to locate keys by mail addresshelp
--auto-key-importimport missing key from a signaturehelp
--include-key-blockinclude the public key in signatureshelp
--disable-dirmngrdisable all access to the dirmngrhelp
-r, --recipient USER-IDencrypt for USER-IDhelp
-u, --local-user USER-IDuse USER-ID to sign or decrypthelp
-se -rsign and encrypt for user Bobhelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.