zip -r -e --password=yourpassword -AES256 secured_backup.zip my_folder/
If you don't have GPG installed, OpenSSL is a powerful alternative already present on most Unix-like systems. password protect tar.gz file
Once upon a time, in a digital realm filled with open folders and vulnerable data, a user wanted to pack away a collection of sensitive scripts. They reached for the classic tar command to bundle them and gzip to shrink them down, creating the familiar archive.tar.gz . zip -r -e --password=yourpassword -AES256 secured_backup
openssl enc -aes-256-cbc -salt -in "/tmp/$BACKUP_NAME.tar.gz" -out "/secure/backups/$BACKUP_NAME.tar.gz.enc" -pass pass:"$PASSWORD" openssl enc -aes-256-cbc -salt -in "/tmp/$BACKUP_NAME
Here is the story of how you can secure your data using a tool like , which is the most common way to get the job done on Linux and macOS. The Quest for the Locked Archive
Not a .tar.gz ; standard Zip encryption is weaker than GPG (use -e for basic or specialized flags for AES). Verdict: Which should you use? GPG (GnuPG) Security ⭐⭐⭐⭐⭐ ⭐⭐⭐⭐ Ease of Use Portability