Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I create an encrypted (password protected) zip file?

share|improve this question
up vote 49 down vote accepted

This will prompt for a password:

zip --encrypt files

This is more insecure, as the password is entered/shown as plain text:

zip --password (password) files

Warning, the standard zip encryption is very weak and is easily cracked.

share|improve this answer
Is there a better option from the standard encryption? – David Oneill Dec 15 '10 at 20:47
Using gnupg on the final zip with a key for yourself or your destination. – Pete Ashdown Dec 15 '10 at 21:43

You can also right-click on a folder or file(s) in Nautilus and select "Compress...". In the resulting window, you can expand the "Other Options" section to enter a password.

alt text

If the password field or any of the other options are not enabled, then the selected compression option does not support it. Select a different one from the list after the filename. According to the documentation:

Currently, only 7-Zip, ZIP, RAR and ARJ archives support encryption

share|improve this answer
It's worth noting that you need to install .rar before you can use it in the compressor. – Xeoncross Feb 20 '12 at 0:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.