How to create compressed encrypted archives with tar and gpg - LinuxConfig.org

There are many reasons why you may want to create compressed encrypted file archives. You may want to create an encrypted backup of your personal files. Another possible scenario is that you may want to privately share content with a friend or colleague over the web or through cloud storage. Tar.gz files, or compressed tarballs, are created using the tar command. These tarballs are pretty much the standard go-to format for archives on GNU/Linux, however they are not encrypted. In the above scenarios that we mentioned it is often desirable to have encryption in order to secure your data. This is where gpg comes in.


This is a companion discussion topic for the original entry at https://linuxconfig.org/how-to-create-compressed-encrypted-archives-with-tar-and-gpg

I use the GUI program Engrampa Archive Manager. I compress and encrypt with 7zip, which can password protect and hide your file list too. After testing the .7z file I use Bleachbit to securely wipe the file and clear the logs.

Engrampa is a great GUI alternative. Your tip about Bleachbit can also be useful. Thanks for the input!