Gnupg

GPG allows you to encrypt and sign your data and communication, features a versatile key management system as well as access modules for all kinds of public key directories. If interested, also read more about PGP Keyservers and the SKS Keyserver.

Encrypting a File
gpg -e -r  

Signing a File
gpg -s -r  

Encrypting & Signing a File
gpg -es -r  

Verifying a Signature
gpg --verify 

Decrypting a File
gpg -d 

Signing a Key Locally
gpg --lsign-key 

Refresh Public Keys from Key Servers
gpg --refresh-keys

Exporting a Public Key to a file
gpg --export  > .pub.asc

Exporting a Public Key to a Key Server
gpg --keyserver keys.gnupg.net --send-keys 

Importing a Public Key from a File
gpg --import 

Importing a Public Key from a Key Server
gpg --search-keys [ OR ] Or you may add the key server url gpg --keyserver hkp://keys.gnupg.net --search-keys [ OR <Email Address>]

Setting Trust Level on a Key
gpg --edit-key <Key-ID> Command> trust 1 = I don't know or won't say 2 = I do NOT trust 3 = I trust marginally 4 = I trust fully 5 = I trust ultimately m = back to the main menu Your decision? 5   Do you really want to set this key to ultimate trust? (y/N) y Command> save gpg --update-trustdb

Creating a new Private Key
gpg --gen-key