Below you will find a reference to the most useful commands.

Check if GPG is installed

gpg --help

List your keys

gpg --list-keys

Generate a new key pair

gpg --full-generate-key

# Choose what kind of key you want, the key size and specify an expiration date.

Export your public key

gpg --export --armor --output jane_doe_pgp.public_key.asc

Backup and restore your key pair

gpg --export-secret-keys --output --armor jane_doe_pgp.private_key.asc

Edit your key's expiration date

gpg --edit-key

Change the key's passphrase

gpg passwd