


$ zip -er DESTINATION_FILENAME.zip SOURCE_FILENAME To encrypt a folder we have to type the following command in Terminal. I have my confidential folder (name: TopSecret) on my Desktop so I will go to Desktop by typing the following command in the Terminal Now go inside the folder (directory) in which you have the confidential folder that you want to encrypt. Or, you can go to Finder then click on Applications then go inside the Utilities folder and select Terminal. Press Cmd + Space key and it will open Spotlight.

This way only authorized persons who have the password can unzip the encrypted zip file.Īlright, let's go ahead and create an encrypted zip file. To protect the zip file from prying eyes and unauthorized access you can encrypt the zip file using a strong password. Moreover, anyone can unzip that file and access your confidential content. Let's say you have a folder containing some confidential files and you want to create a zip file that is password protected and encrypted.Ĭreating a plain zip file is not wise as it provides no extra security. In this tutorial we will learn to create password protected and encrypted zip file using the Terminal.
