Forrest logo
back to the gpg2 tool

gpg2:tldr:b96e2

gpg2: Export the public key of a specified email address to the standard output.
$ gpg2 --export --armor ${alice@example-com}
try on your machine

This command uses GnuPG (GPG) version 2 to export a public key and convert it into an ASCII-armored format. Let's break down the command:

  • gpg2: It is the command to run the GnuPG version 2 executable.
  • --export: This option specifies that the command should perform a key export operation.
  • --armor: This option indicates that the exported key should be in ASCII-armored format. ASCII-armored format means that the binary key data is encoded using only printable ASCII characters.
  • ${alice@example-com}: This is a placeholder for the email address associated with Alice, in the format alice@example-com. For the command to work correctly, you need to replace ${alice@example-com} with the actual email of the person whose public key you want to export.

In summary, running this command will export Alice's public key and convert it into an ASCII-armored format, making it suitable for sharing via text-based platforms like email or text files.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the gpg2 tool