Tar.gz File | Password Protect
GnuPG is the standard for high-security encryption on Linux and macOS. It uses the AES-256 algorithm by default. Create and encrypt in one step: tar -cz folder_name | gpg -c -o archive.tar.gz.gpg Use code with caution. Copied to clipboard : Uses symmetric encryption (password-based). : Specifies the output filename. Decrypt and extract: gpg -d archive.tar.gz.gpg | tar -xz Use code with caution. Copied to clipboard Method 2: Using OpenSSL
openssl enc -aes-256-cbc -salt -in myfiles.tar.gz -out myfiles.tar.gz.enc password protect tar.gz file