linux:utilities:gpg
This is an old revision of the document!
GnuPG
Links
- Free Software Foundation: The GNU Privacy Handbook
- Ubuntuusers Wiki: GnuPG
- Wikipedia: Pretty Good Privacy
Commands
- generate GPG keys (for sign/verify and encrypt/decrypt):
gpg --generate-key - list all keys in GPG keyring:
gpg --list-keys - list private keys:
gpg --list-secret-keys --with-subkey-fingerprints - show fingerprint of key <email>:
gpg --fingerprint "<email>" - export public key associated with <email>:
gpg --output <mail>.gpg --armor --export "<email>" - import public key from <file>:
gpg --import <file> - show encrypted file information:
gpg --batch --list-packets <file>.gpg - decrypt (binary, not armored) <file>.gpg:
gpg --output <file> --decrypt <file>.gpg
Files
~/.gnupg/*
Ensure to use
gpg2 instead of gpg v1:ln -s /usr/bin/gpg2 $HOME/bin/gpgalias gpg="gpg2"- Emacs Lisp:
(setq epg-gpg-program "gpg2")
linux/utilities/gpg.1754075136.txt.gz · Last modified: by Ralf Hoppe
