An anonymous reader asked, "Why people want to create a zip password in Linux?". Well creating a password protected zip file is common these days especially if you are sending a confidential file or folder along the way. A zipped file with password will only be accessed by those whom you provide the password and this way it stays secure. While Linux is an Open source OS; it is considered most powerful and protected one as well. So, in this article I will be guiding through the process of creating an encrypted zip file while using Linux in two different ways.

[GUI Method] Create Password Protected ZIP File in Linux

Creating zip password in Linux using GUI method is pretty easy and it works great in these terms. Here's what you can do to create protected zip file using Linux GUI:

Step 1: Choose Files and Folders and "Right Click" and then click on"Compress".

Right Click on Selected files and choose Compress

Step 2: Now choose .zip format from drop down menu in front of name file and Click on "Other Options".

choose zip format and click on Other options

Step 3: You'll have option to Enter Password to encrypt .zip file with. Enter your password and click on "Create".

Enter password and click on create

Step 4: Depending on your systems specification and size of files; a protected zip will be created within few seconds or minutes.

Success message will display upon completion

Congrats, you just created your first Linux zip with password using graphical user interface on Linux that no one can access without knowing its code.

[Command Line Method] Create password protect zip file in Linux

There are many things that comes in mind when we are choosing to protect a zip using Linux command line/terminal. You could be protecting it from your friends, colleges or securing it from anyone else accessing the files inside zip file. Okay, so now that we have an idea why you might be protecting your zip file let's see how you can achieve it. First of all, you'll have to install zip support and make sure it is working. Here's step by step guide to do it.

Use This Command to Install Zip support in your Linux based system: sudo apt install zip unzip

Now that you have installed zip support into your system let's see how you can zip a file before proceeding to protecting it:
zip -r output_file_name.zip file_name folder_name

Enter Above Command Using your Files and Folders name

Note: The -r option is used to recursively look into directories.

The above command will create a zip file in you with the name you given it. Now, let's see how to password protect a zip file in Linux operating system. The method is quite similar as creating zip folder in Linux. The only difference is we also use option -e option that is for encryption purpose:
zip -re output_file_name.zip file_name folder_name

After entering above command once you hit the Return button; You'll be asked to enter and verify the password. You will not be able to see the password; it's Linux protocol there's nothing wrong; just make sure you remember it. After entering password press enter and verify it again.

Enter Above Command to password protect your zip in terminal

Other Tips: How to Unlock Password Protected ZIP in Windows

Now you know about two methods of creating a zip with password in Linux, you will be creating a lot of them depending on your need. In case you forget password of zip file that you've created, and it has important data inside and you need them immediately. This is where PassFab for ZIP comes in; it is a third-party software that offers 100% success rate. It recovers your password without losing a single bit of it. It uses multiple decryption technique that it can even decrypt AES algorithm protected file as well. PassFab for ZIP is using three major techniques for breaking password that offers optimal result. These techniques are:

  • Brute-force Attack: Try all possible combinations, which takes more time.
  • Brute-force with Mask Attack: Customize numbers, symbols, characters, etc.
  • Dictionary Attack: Quickly find the password from inbuilt or customized dictionary.

If you don't have an idea of how you can use it. Here is the guide to help you step by step during the process:

Step 1. Download and install PassFab for ZIP from its official site.

Step 2. Run the PassFab for ZIP and all options will be displayed in front of you.

zip password recovery

Step 3. Now import the password protected ZIP file by clicking "'Add' button.

import zip

Step 4. Once successfully imported select the one of the three attack options:

1. Choose "Brute Force Attack" if you can't remember a single word of your password. It will try all possible combination of password.

2. Choose "Brute Force with Mass Attack' if you have some clue about your password. It will pop multiple options. Select that are relevant to your lost password and click "OK'.

3. Choose "Dictionary Attack" if you have password dictionary with you. This will frequently recover your lost password. Add the dictionary and click "OK'.

Note: if you choose dictionary attack there might be a message "Upgrading the Dictionary Library". Don't worry it will take some time to complete.

add file

Step 5. After setting all the details to PassFab for ZIP, click "Start" button and let the program recover password for you.

start check

Step 6. Once the program exits successfully, a success diagonal along with the password will appear.

succeed

Final Verdict

This article teaches you process of creating a protected zip file using two methods in Linux. The first method explains how to create a password protected file using GUI on Linux OS. On the other hand, second method guides you to create a password protected file using Terminal of Linux. Later, PassFab for ZIP is introduced that can recover password of any zip file in just matter of time. It is a really useful zip password recovery tool and step by step method is provided; that users can follow to unlock their zip files.