Usage Tips:
- Click on a keyword to enable inline editing.
- Click inside a code block to copy (excludes comments).
- Use the button to view examples.
- Click outside to collapse all examples.
General
# Check version
gpg --version
Sample Output:
TO-DO
# Generate new key
gpg --gen-key
Sample Output:
TO-DO
# Export private key
gpg --homedir <GNUPG_DIR> --export-secret-keys --armor > key.asc
Sample Output:
TO-DO
# Export public key
gpg --export -a <USER>@<DOMAIN>
Sample Output:
TO-DO
# Check keys
gpg --list-keys
Sample Output:
TO-DO
# Import public key
gpg --import <PUB_KEY>
Sample Output:
TO-DO
# Encrypt a message with public key (Email from pubKey)
gpg --encrypt --armor -r <USER>@<DOMAIN> <FILE>
Sample Output:
TO-DO
# Decrypt a message with our private key
gpg --homedir <GNUPG_DIR> -d <ENC_FILE>
Sample Output:
TO-DO
# Sign our own message
gpg --clearsign --output - <FILE>
Sample Output:
TO-DO