Thursday, December 26, 2024
Google search engine
HomeGuest BlogsHow to Create a Password Protected ZIP File in Linux

How to Create a Password Protected ZIP File in Linux

Create password protected zip and unzip files in Linux; Through this tutorial, we will learn how to create password protected zip files and directories in Linux system using a terminal and GUI.

Sometimes what happens to us is that our files and directories are in zip format. And We have to password protect them. So that no one can unzip those zip files without password.

Commands are given for zip and unzip in Linux system. Using this we can password protected zip and unzip any file and directory.

We know that the first method can be password protected zip and unzip files and directories using the command line. And there is another way we can use graphical user interface to password protected zip and unzip files and directories.

How to Create a Password Protected ZIP File in Linux

There are 2 ways to create password protected zip and unzip files and directories. Which are given below:

  • Create Password Protected Zip using Terminal
  • Create Password Protected Zip using GUI

Create Password Protected Zip using Terminal

Before we create password protected zip file, we need to install the zip and unzip packages into our Linux system by using the following command:

sudo apt install zip unzip

Next, create a zip archive with a password by using the following command:

zip --encrypt test1.zip test1

Then prompt will be open for enter the password as shown below:

Enter password: 
Verify password: 

Finally, using the following command to try to unzip the password-protected zip file, as above created:

unzip test1.zip

Then prompt will be open to enter password for unzip the file:

Archive:  test1.zip
[test1.zip] test1 password: 

Create Password Protected Zip using GUI

Now, use the following steps to create zip using GUI; as following:

  • Step 1: Visit the file location
  • Step 2: Right-click on the file
  • Step 3: Click on the compress option
  • Step 4: Then click on the other option and set your password and click on Create option

Conclusion

Through this tutorial, we have learned how to create password protected zip files and directories in Linux system using a terminal and GUI.

Recommended Linux Ubuntu Tutorials

RELATED ARTICLES

Most Popular

Recent Comments