Last Updated: February 25, 2016
· franklouwers

Use p7zip to open encrypted zip files

If you try to open an encrypted ZIP file but get cryptic errors such as:

$ unzip
   skipping: secret.pdf  need PK compat. v5.1 (can do v2.1)
   skipping: secret.txt  need PK compat. v5.1 (can do v2.1)
   skipping:secret.xml  need PK compat. v5.1 (can do v2.1)

Then install the p7zip tool. The standard unzip that ships with most Linux and Mac OSX systems, can't handle the encryption. p7zip ( is based on a newer version of the ZIP standard and handles encrypted zips:

 $ 7z x 

7-Zip [64] 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
p7zip Version 9.20 (locale=utf8,Utf16=on,HugeFiles=on,8 CPUs)

Processing archive:

Extracting secret.pdf
Enter password (will not be echoed) :

Extracting  secret.txt
Extracting  secret.xml

Everything is Ok

Files: 3
Size:       25557
Compressed: 24101