If you are a Mac user then guide below will let you know how you can create encrypted Zip file on Mac using Terminal commands and protect your sensitive data. So, it will minimize the damage to your data if someone get unauthorized access to your Mac.
Create Encrypted Zip Files on Mac
Find “Terminal” in Spotlight and select it to launch or you can navigate through “Finder” icon from the dock > “Applications” > “Utilities” > “Terminal”
Note: In terminal jump to the exact path where you have file or folder that you want to make password protected. In our case the folder exists on Desktop, so first we move to desktop through Terminal by typing command
cd desktop and then we continue with the command to create protected zip file.
Create Password Protected Zip file from a Folder
Terminal command to Create password protected zip file
zip -e TW.zip TW
zip -e = command name
TW.zip = zip file name, which we are going to create from TW folder
TW = original folder name
When we type this command and hit return, terminal will ask for the password and verification of password, provide that, and in result TW.zip file will be created on your current path.
Create Password Protected Zip from a File
If you want to protect a single file instead of folder use this command
zip -e TWDocument.zip TWDocument.jpg
TWDocument.zip = protected file that we are going to create
TWDocument.jpg = file name with extension that we want to protect
Now, When we try to unzip created zip file, Archive Utility will prompt and ask to enter password to make the contents of zip file visible.