Linux Mint

How to Zip a Folder in Linux Mint 21

Zip is the file format tool used to compress one or more files in a system. Compressed files take less storage space than uncompressed files and can transfer more quickly. Whenever we need to transfer files/folders via email or through any communication medium, the trouble occurs due to large file data when there’s limitation to file size. To overcome these problems, we compress a folder that helps to reduce file size and transfer speedily.

Another advantage is you can store unnecessary data in the form of a compressed folder and unzip them when required.

Zip a Folder in Linux Mint 21

We can zip a folder using two different ways:

  • Via Command-line Interface (Terminal)
  • Via Graphical User Interface (GUI)

Zip a Folder Through Terminal – Linux Mint 21

To compress the folder via terminal can be done using the zip format tool. The new release of Linux distributions comes with pre-installed utilities including zip or unzip.

Let’s check if it is installed in our system or not, type:

$ zip --version

As I am working on the latest release of Linux Mint 21, zip is already present in the system.

If you don’t have it on system, the installation command is mentioned-below:

$ sudo apt install zip

Let’s come to main topic:

To zip a folder, following syntax would be followed:

zip [option..] [output_folder (.zip extension)] [input_folder]

For Example:
There’s a folder present in the “Home” directory named “SampleFolder” that we need to compress. To check its presence, type in terminal:

$ ls

The SampleFolder contains further several files:

$ ls SampleFolder

Now, compressed this folder using the zip command-line tool by executing the following command:

$ zip -r ZippedFolder.zip SampleFolder

To confirm if our selected folder has compresses or not, type in terminal:

$ ls

As you can see, our SampleFolder has been converted to the compressed folder “ZippedFolder”.

Zip a Folder Through GUI – Linux Mint 21

To compress a file through a graphical user interface is quite easy. You need to follow few steps:

Right click on the directory you want to zip and move the cursor towards Compress option:

Once you clicked on Compress option, a Compress dialogue box will appear in which you have to type the name of Zip folder, select “.zip” extension and click on the ”Create” button:

It will create a zip folder in your “Home” directory:

Conclusion

Whenever we need to transfer files/folders via email or through any communication medium, the trouble occurs due to large file data when there’s limitation to file size. Compressing a folder helps to take less storage space and can transfer to other devices quickly. In this write-up we have seen how to zip a folder in Linux Mint 21 system using two methods i-e, through GUI and Terminal.

About the author

Syeda Wardah Batool

I am a Software Engineer Graduate and Self Motivated Linux writer. I also love to read latest Linux books. Moreover, in my free time, i love to read books on Personal development.