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.



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 FOLDER

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


zip -re gfg

Check your file( is created with password protected.




You can easily unzip the file with these commands.


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




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.