Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question

3 Answers 3

up vote 24 down vote accepted

This will prompt for a password:

zip --encrypt file.zip files

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

zip --password (password) file.zip 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

An alternative to the password protected zip volume if you're concerned with security may be:

  • a local/remove encfs partition, or;
  • a file/partition based Truecrypt volume (many options to obscure, hide and increase the security complexity several times with this).
share|improve this answer

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.