Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kat.hayes

macrumors 65816
Original poster
Oct 10, 2011
1,448
52
I have read a few pages online, though I am still confused as to how to password protect a .zip in Terminal. I have a folder on my desktop that I need to make into a .zip and add a password to. I bring up Terminal and I go to the desktop using cd /Volumes/desktop

I am now not clear on the commands that come next. The folder on my desktop that I want to zip and password protect is called Taxes 2022

1.) The command I was trying to use in Terminal was
zip -er TAXES 2022.zip TAXES 2022

What do I need to change with the command to make it work?

Thanks!
 
Code:
zip -er "TAXES 2022.zip" "TAXES 2022"

You need quotes around the folder name because it contains a space.
 
  • Like
Reactions: kat.hayes
You don't need to use terminal.

1) Highlight the folder, right click and tap on Compress. That will create a zp file of the folder.
2) Open Disk Utility > File > New > Image from Folder > Pick your folder > Under the Encryption option, pick 128 and type in the password you want.
After compressing the folder into a .zip it does not show up in the options in the Disk Utility window. It is greyed out.
 
After compressing the folder into a .zip it does not show up in the options in the Disk Utility window. It is greyed out.
I messed up on my instructions. I apologize for telling you wrong. With Disk Utility open, point to the uncompressed folder and follow as before. You will have a password protected folder with a DMG extension. When you want to open the folder, just double click and input the password to view contents.
 
  • Like
Reactions: kat.hayes
I messed up on my instructions. I apologize for telling you wrong. With Disk Utility open, point to the uncompressed folder and follow as before. You will have a password protected folder with a DMG extension. When you want to open the folder, just double click and input the password to view contents.
Any particular reason for choosing 128 instead of 256 for level of encryption? Thanks
 
I have read a few pages online, though I am still confused as to how to password protect a .zip in Terminal. I have a folder on my desktop that I need to make into a .zip and add a password to. I bring up Terminal and I go to the desktop using cd /Volumes/desktop

I am now not clear on the commands that come next. The folder on my desktop that I want to zip and password protect is called Taxes 2022

1.) The command I was trying to use in Terminal was
zip -er TAXES 2022.zip TAXES 2022

What do I need to change with the command to make it work?

Thanks!
Note that password protecting zip files is not secure. The suggestion above to make an encrypted disk image is a good one but these are not compatible with Windows, in case that matters.
 
  • Like
Reactions: kat.hayes
Note that password protecting zip files is not secure. The suggestion above to make an encrypted disk image is a good one but these are not compatible with Windows, in case that matters.
ugh...I do need to share it with someone on a Windows computer.

1. Why is it not secure to password protect the zip file if I use a strong password?
2. How can I zip a folder, encrypt it, and make it usable on a Windows computer.

Thanks
 
Last edited:
  • Like
Reactions: Arctic Moose
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.