User Tools

Site Tools


linux:utilities:gpg

Table of Contents

GnuPG


Commands

  • generate GPG keys (for sign/verify and encrypt/decrypt): gpg --generate-key
  • list all keys in GPG keyring: gpg --list-keys
  • 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/gpg
  • alias gpg="gpg2"
  • Emacs Lisp:
    (setq epg-gpg-program "gpg2")
linux/utilities/gpg.txt · Last modified: 2021/04/10 09:38 by Ralf Hoppe