How to Password Protect a Folder in Linux using Zip Encryption

Protecting sensitive files on Linux doesn’t always require complex encryption software. You can easily password protect a folder by compressing it into an encrypted ZIP file using the terminal.

How to Encrypt a Folder

  1. Open your terminal.
  2. Install zip if it is not already installed: sudo apt install zip.
  3. Run the following command: zip -er protected_folder.zip /path/to/folder.
  4. You will be prompted to enter and verify a password.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.