To password-protect a ZIP file on a Mac, use the Terminal to run the command zip -er archive.zip folder/, replacing archive.zip with your desired file name and folder/ with the folder or files you want to compress. After entering the command, you'll be prompted to type and verify your password, which will then protect the ZIP archive.
- Open Terminal: Search for and open the Terminal application on your Mac (found in Applications > Utilities).
- Navigate to your files: Use the cd command to change the directory to where your files or folder are located. For example, to go to your desktop, type cd Desktop and press Enter.
- Enter the command: Type the following command into Terminal, pressing Enter after each part: