GnuPG : key commands

Last update on September 21, 2009 07:41 AM by jak58
Published by aakai1056

GnuPG : key commands






Below is a list of main commands for operating GnuPG
  • Generate double keys: gpg --gen-key
  • List available keys: gpg --list-keys
  • Exporting your public key: gpg --armor --export keyID
  • Importing a key: gpg --import filename
  • Calculating the fingerprint of a key: gpg --fingerprint keyed
  • Signing a key: gpg --sign-key keyed
  • Encrypt and signing a message: gpg -sea -r keyID then type the message followed by key button CTRL+Z
  • Signing a public message: gpg --clearsign -a -r keyID then type the message followed by key CTRL+Z
  • Decrypt a message/verify signature: gpg < message.txt
  • Encrypt a file with a password: gpg -c filename
  • Decrypt a file with password: gpg filename
  • Sign a file (signature in a separate file): gpg --armor --detach-sign filename (This will be created as filename.asc with the message)
  • Verifying detached signature file .asc: gpg filename.asc

Storage keyring


The public and private keys are stored in the storage keyring namely pubring.gpg for public keys and secring.gpg for private keys.
  • This file is located in ~/.gnupg for Linux and POSIX OS.
  • Under windows Operating Systems, it is located in: C:\Documents and Settings\votrelogin\Application Data\gnupg\
  • To access pubring.gpg, execute the following command : gpg --list-keys

Public Key servers

Best answers for « GnuPG : key commands » in :
Accessing Safe Mode without key F8 ShowAccessing Safe Mode without key F8 Introduction Explanation Introduction Safe mode is the windows maintenance mode of a computer operating system. You can access your computer to diagnose problems on your computer. Below is a tips of...
Manage the registry in command line ShowManage the registry in command line Adding an Item Add a Key Add a value Add default value Deleting an Item Delete a key Remove a value Delete the default value Notes Here is how to manage the registry using the command line (REG...
[Windows] Auto-completion of commands in the console ShowAuto-completion of commands within a console When using Linux a practical feature is to be able to complete a command by typing the first characters and pressing the TAB key to resume the rest. This feature can allow you to save time(Typing...
Download Key Launcher ShowKey launcher is a tool that enables you to assign hot key to system commands. Simple and easy to use, the application offers a user friendly interface. You can assign hot keys to open files, programs, change volume level and more. Features Assign...
Download WIFI Key Generator ShowWifi Connections are certainly very practical, but given that they require no wiring, everybody can be connected to it if his computer is compatible with Wifi. WIFI Key Generator is a small application intended to generate random protection keys for...
UNIX Commands ShowTable of the main UNIX commands Unix Commands Description Options ls lists the content of a directory -a Displays all files, including hidden files -I Displays a...
Operating Systems - MS-DOS - Commands ShowCommand Description dir lists the contents of a folder cd changes folder cd .. parent folder md or mkdir creates a new folder deltree deletes a folder and all sub-folders copy, xcopy copies...
Linux commands ShowTable of main Linux commands Command Description DOS equivalent ls lists the content of a directory dir cd change directory cd cd .. parent directory cd.. mkdir creates a new...