How to Create a Password Protected ZIP File.

How To Create A Password Protected ZIP File.

Linux provides Zip command to work with a file like compressing the file and decompressing with a password. It’s not come with built-in you need to install from an external source. The Zip command has two different utility(zip and unzip). zip is used for compressing the file and unzip is used for decompressing the file.

 

Installation

Use this command in Ubuntu, Debian, and Linux mint.

sudo apt install zip unzip

For Arch Linux:

sudo pacman -S zip unzip

For Red Hat, Fedora, and CentOS.

sudo dnf install zip unzip

Zip the file with the following commands.

zip -re OUTPUT_FILE.zip FOLDER

While running this command it will ask the password for a zip file.

Example:

zip -re output_data.zip gfg

Check your file(output_data.zip) is created with password protected.

ls

 

Unzip

You can easily unzip the file with these commands.

unzip YOUR_FILE.zip

While running this command it will ask the password for a decompressing zip file.

Example:

unzip output_data.zip

 

Create a Password-Protected ZIP File in Linux Using GUI

We can use our GUI window to create a zip file and unzip too. Here are the following steps:

Step 1: Go to the file location and right-click on the file.

Step 2: Step

3: Then click on the other option and set your password and click on Create option.

  • Then click on the compress option.

  • Your Password-Protected ZIP File is created.