• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / How To Zip A Folder In Ubuntu Terminal With Password

How To Zip A Folder In Ubuntu Terminal With Password

By Sourabh / October 28, 2023 Category: How To, Ubuntu

Learn how to zip a folder in Linux using command; creating zip folder in Linux using zip command. Also learn to zip folder in Linux with password.

If zip command line tool is not installed on your system, open the terminal and write the following command to install the zip and unzip command line tools:

$ sudo apt install zip unzip

Once installed, you can run the zip command to zip a folder in Linux terminal. The sytntax of the zip command is:

$ zip -r <output_file> <folder_1> <folder_2> ... <folder_n>

For example, let’s say that you want to zip/archive a folder named “Image-Folder” in a zip file named “Image.zip”. You will run the following command:

$ zip -r Image.zip Image-Folder

Once the command is executed, the Image.zip archive will be created. To check if the zip file was created or not, run the “ls” command and search for your archive file.

$ ls -l | grep .zip

Zip folder in Linux with password

To zip folder in Linux with password, use the command option -e or –encrypt. These parameters set a password for the zip file. For example, to zip/archive a folder named “Image-Folder” in a password protected zip file named “Image.zip”. You will run the following command:

$ zip --encrypt Image.zip Image-Folder

To unzip the .zip files run the unzip command. See below:

$ sudo unzip -r Image.zip

Note: For password protected zip archive, yuo will need to enter the password to unzip.

Primary Sidebar

Latest Posts

Ubuntu 25.04 ‘Plucky Puffin’ Is Available To Download

How to Login as Root User in Linux Terminal

Install Firefox In Ubuntu Terminal Command Line

How To Check Kernel Installed Date In Linux Ubuntu

How To List All Kernel Modules That Are Loaded In Ubuntu

Enable Ubuntu Auto Login Without Password

Download Ubuntu 25.04 Official Default Wallpapers

How To Fix Initramfs Error In Ubuntu Command Line

How To Check All Available Kernel Version In Linux Ubuntu

3 Best Artificial Intelligence Domain Name Generators

© 2025 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap