From the command line
Let's say you have a file, ~/Documents/important.docx, that you want to password protect. Using gpg, you would do the following.
- Open a terminal window.
- Change to the ~/Documents directory with the command cd ~/Documents.
- Encrypt the file with the command gpg -c important.docx.
- Enter a unique password for the file and hit Enter.
- Verify the newly typed password by typing it again and hitting Enter.
You should now see the file important.docx.gpg in the ~/Documents folder. To decrypt that file, do the following.
- Open a terminal window.
- Change to the ~/Documents directory with the command cd ~/Documents.
- Decrypt the file with the command gpg important.dox.gpg.
- When prompted, enter the decryption password you created when encrypting the file.
You could send that file to a recipient and, as long as they have gpg installed, they can decrypt the file with the password you used for encryption. If they are a Windows user, they can always install Gpg4win.