How to Create a Password Protected ZIP File in Linux

How to Create a Password Protected ZIP File in Linux

If you are creating a zip file and you need to password protect it Linux Ubuntu system, There are 2 options available for this, first, you can do it with the help of a command line or terminal, and second, you can use the GUI.

If you want to use the command line or terminal, you need to type your zip –e filename command on the terminal, or if you want to use the gui, you need to select the file and right click, and select the option for password protected file, it will be password protected on linux ubuntu.

Here are 2 options to create password protected zip file on Linux Ubuntu server:

Option 1: Linux Ubuntu Create Password Protected Zip Command Line

To password protect a zip file on the Linux Ubuntu terminal or command line, you have already installed zip package on your server, If it is not, you can type this command in the terminal and press enter and it will install.

sudo apt install zip unzip

Type zip -e filename or zip –encrypt filename command to create a password protected zip file on Linux Ubuntu command line or terminal:

zip --encrypt test1.zip test1

Once it asks for enter the password on your command line, as follows;

Enter password: 
Verify password: 

Or if you want to unzip the zip file, for this you can use the command:

unzip test1.zip

It will ask you to enter a password to unzip the file, as follows:

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

Option 2: Create a Password-Protected ZIP File in Ubuntu Linux Using GUI

Now let’s talk about the second option, in this, you will not need a terminal or command line. In this, you can create a password protected zip file of any file from the Linux Ubuntu desktop itself, for follow these steps:

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

Watch the video guide on how to create a password protected zip file on the Ubuntu Linux command line:

Conclusion

Through this tutorial, you have learned how to create password protected zip file in ubuntu Linux system using command line and GUI.

Recommended Linux Ubuntu Tutorials

AuthorAdmin

Greetings, I'm Devendra Dode, a full-stack developer, entrepreneur, and the proud owner of Tutsmake.com. My passion lies in crafting informative tutorials and offering valuable tips to assist fellow developers on their coding journey. Within my content, I cover a spectrum of technologies, including PHP, Python, JavaScript, jQuery, Laravel, Livewire, CodeIgniter, Node.js, Express.js, Vue.js, Angular.js, React.js, MySQL, MongoDB, REST APIs, Windows, XAMPP, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL, and Bootstrap. Whether you're starting out or looking for advanced examples, I provide step-by-step guides and practical demonstrations to make your learning experience seamless. Let's explore the diverse realms of coding together.

Leave a Reply

Your email address will not be published. Required fields are marked *