This will prompt you to enter a password to encrypt the file.
gpg --symmetric --cipher-algo AES256 backup.tar.gz password protect tar.gz file
Prompts for the password and restores the original file. gpg -d my_archive.tar.gz.gpg > my_archive.tar.gz Use code with caution. Copied to clipboard One-Step (Archive + Encrypt): tar -czf - folder_name | gpg -c > archive.tar.gz.gpg Use code with caution. Copied to clipboard 2. Using OpenSSL This will prompt you to enter a password to encrypt the file