The more security levels you have on your Mac, the more protected your files are. That’s especially true if you allow your computer to be used by multiple people. It’s a smart idea to create a password-protected folder for your most important files, for an extra layer of security. In this tutorial, you will 2 different ways to password protect a folder on Mac for absolutely free and without installing third-party apps.
Fortunately, MacBook owners are able to secure their confidential files by password locking particular folders from prying eyes. Many paid programs provide similar features, but we prefer this free method built into Apple, which allows folders to be transformed into secure disk images. That goes as far back as 10.6 Snow Leopard on Mac OS X.
Here you will 2 different ways to password protect a folder on Mac:
- Password Protect a Folder on Mac using Disk Utility
- Password Protect a Folder on Mac using Terminal
You Might Also Like:
Method 1. Password Protect a Folder on Mac using Disk Utility
Folders can not be encrypted directly into macOS, but you can place them in password-protected containers. This has the benefit of securing your folders with a password and the files they hold. You can use the built-in Disk Utility application to password-protect files on macOS.
Note: By following the steps below, you will create a password-protected disk image (DMG) folder on a Mac. If you want to password-protect files certain files like images, video and etc, you may place them in password-protected folders.
Step 1. Launch the Disk Utility app (Applications > Utilities > Disk Utility).
Step 2. In the Disk Utility window, click the File tab, select New Image and click Image from Folder.
Step 3. Select the folder you want to password-protect from the pop-up file browser window. In my case, it is the private folder and click Choose.
Step 4. You can save this new folder as anything you want. Select where you want to save this folder. You can name it anything you wish.
Step 5. Click on the Image Format option menu and select read/write.
Step 6. Click on the Encryption menu and click 128-bit AES encryption (recommended).
Step 7. When you select the encryption, you will be asked to enter a password. Enter your desired password twice and click Choose. This is the password you will enter to unlock the disk image.
Step 8. Click Save to create the encrypted disk image. This will start a short process in Disk Utility which will notify you when it is finished creating the disk image from your folder.
Step 9. At last, click Done to exit.
Step 10. Now, the folder is completely password protected.
This DMG file is not the same as your folder but it is a copy of the content of the folder in the format of a disk image. The disk image is password-protected which needs a password before it can be mounted and read. The initial folder was unchanged and would not be encrypted.
Open the disk image and enter your password to ensure that you will be able to access the image and that it contains all the files in the folder. If you’re confident that everything went well, delete the folder unencrypted. That leaves behind only the encrypted DMG.
Method 2. Lock a Folder on Mac using Terminal
You can also password protect the folder using the Terminal app. Here’s how to password protect a folder using the Terminal app on Mac:
Step 1. Press Command + Spacebar simultaneously to open Spotlight and type Terminal and open it.
Step 2. Now, go the directory that contains the folder you want to be password protected. In my case, it’s in the document directory a file named private and keep the window open.
Step 3. On the Terminal window, type cd and give a space and drag the icon from the folder into the Terminal.
Step 4. Type LS and press enter to see the files list. In my case, it’s the private folder.
Step 5. Type zip -er your folder name.zip “any folder name” and press enter. In my case, the folder name is private. I will type zip -er private.zip “private“. As you can see in the screenshot below.
Step 6. Enter your password and press enter.
Step 7. Verify your password and press enter.
Step 8. Now, you have successfully password protected your folder using Terminal.
As you can see in the screenshot below, that folder is password protected. Your original folder still lives on your Mac, unencrypted. Once you are sure you can access the disk image and the files in it, delete your original folder.
This feature was all about how to password protect a folder on Mac and I have shown you 2 different ways to do so. However, using Disk Utility is much easier than the Terminal. Tell me which method do you prefer to use? Share your comments in the comment section below.