~/GPG CLI Quickstart Tutorial
Feb 15, 2023
This guide covers GPG basics for encryption and signing files using the command line.
Key Generation
To generate a new keypair, run:
|
|
Follow prompts for key type, size, and your info.
Listing Keys
See all your keys:
|
|
Exporting Public Key
Export your public key:
|
|
Encrypting Files
Encrypt a file for a recipient:
|
|
Creates file.txt.gpg
Decrypting Files
Decrypt a file:
|
|
Signing Files
To sign a file:
|
|
Verifying Signatures
To verify a signature:
|
|
More on options at GPG Manual.
All commands can add --help
for more info. Keep your private key safe.