-
Generate a public/private key pair!
gpg --generate-key -
Export a public key
gpg --output name_of_file.gpg --export email_of_user -
Import a public key
gpg --import name_of_file.gpg -
Encrypt a file
gpg --recipient [email protected] --output encrypted_file.gpg --encrypt name_of_file.txt -
Decrypt a file
gpg --output name_of_file.txt --decrypt encypted_file.gpg -
Sign and encrypt a file
gpg --recipient [email protected] --encrypt --sign name_of_file.txt
The output flag is use the specify the name of the newly created file.