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.

Decrypt

To decrypt a file, run

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

Example

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

Need help with Linux Server or WordPress? We can help!

Leave a Reply

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