Monday, 15 December 2014

How to : Password protect a zip file on Linux




Its useful to quickly password either one or a number of files on Linux. For example to transit some files between sites on a USB drive. The encrypt option on the zip command line tool will encrypt the contents of the zip archive using a password which is entered on the terminal in response to a prompt

Note : The Zip encryption is not very strong and could be cracked so use with caution

  • To encrypt a single file :

$ zip --encrypt Example.zip examplefile1
Enter password:
Verify password:

  • To encrypt a multple files :

$ zip --encrypt ExampleMulti.zip examplefile1 examplefile2 examplefile3
Enter password:
Verify password:

  • Tu uncompress the zip file :

$ unzip Example.zip
Archive: Example.zip
[Example.zip] examplefile1 password:

No comments:

Post a Comment