

Join the nixCraft community via RSS Feed or Email Newsletter. He wrote more than 7k+ posts and helped numerous readers to master IT topics. Vivek Gite is the founder of nixCraft, the oldest running blog about Linux and open source. The same command used to zip a folder in Linux. You just learned how to compress a directory in Ubuntu Linux or Debian Linux using the zip command.

See “ HowTo Encrypt And Decrypt Files With A Password Using GPG on Linux and Unix-like Systems” for more info. And where security is truly important, use strong encryption such as Pretty Good Privacy (PGP/GPG) instead of the relatively weak standard encryption provided by zipfile utilities. Whenever possible, use the non-echoing, interactive prompt to enter passwords.

Storing the plaintext password as part of a command line in an automated script is even worse. Many multi-user operating systems such as Linux provide ways for any user to see the current command line of any other user even on stand-alone systems there is always the threat of over-the-shoulder peeking. WARNING: The -P 'YOUR_PASSWORD_HERE' option to the zip IS INSECURE! Avoid it. Zip -r -e -P 'YOUR_PASSWORD_HERE' output.zip /path/to/folder/ We can also use and state password on the CLI to encrypt zipfile entries: We can encrypt and password protect our zip file as follows: Files file manager Password protecting zip file

Gif 01: Compressing a folder in Ubuntu Linux using GUI method i.e. Select folder name such as data and right click the “ Compress…“: Use the Files file manager to browse and organize the files on your computer. To access and organize your files you use “Files” app (file manager)”. Zip -r compressed_data.zip /home/vivek/Jan-2018 zip a folder in Ubuntu Linux using the GUI method Zip -r compressed_data.zip /path/to/foldername The zip command syntax is as follows to compress a directory in Ubuntu Linux: Store symbolic links as the link instead of the referenced file Zip command has many more options as follows: Option
