Encrypt a file using gpg

To encrypt a file using gpg command, run

Now it will ask for a password. Once you enter password 2 times, file will be encrypted.


To decrypt a file, run

It will ask for the password, once you enter password, get file decrypted.


gpg decrypt

This encryption process will also compress the file.

In above example, 1.5 GB tar file get compressed into 600 MB file when encrypted with gpg

Add a Comment

Your email address will not be published. Required fields are marked *