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:
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:
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:
The SampleFolder contains further several files:
Now, compressed this folder using the zip command-line tool by executing the following command:
To confirm if our selected folder has compresses or not, type in terminal:
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.