Labels

Arduino (1) Bugs (3) C (1) Install (3) Linux (25) Maths (1) Python (11) Raspberry Pi (4)

Sunday, 24 January 2016

How to encrypt files on linux using GPG

GPG is part of the group GNU Privacy Guard group. Its a program to encrypt/decrypt files using a key or password, the key being more secure.It can be used to make files with sensitive data in them secure and unreadable without the password or key.

To install GPG run:
sudo apt-get install gnupg

To encrypt a file with a password run:
gpg -c inventorofbitcoin.txt
You will then be promoted to enter a password.
The encrypted file is stored as inventorofbitcoin.txt.gpg note that the original file isn't deleted.

To decrypt a file with a password run:
gpg inventorofbitcoin.txt.gpg
You will then be prompted for the password and after the correct password has entered you will have to original file.