Linux (28) Python (13) Raspberry Pi (5) Bugs (3) Install (3) C (2) Brainf**k (1) HTML (1) Maths (1) Sorts (1)

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.

No comments:

Post a comment