Linux Mint

How to Unzip a File on Linux Mint

Today’s digital world heavily relies on file compression, and ZIP is one of the best applications to do this job efficiently. If you are planning to transfer your data to another device or if you are planning to email multiple files, then the ZIP utility can combine and compress that data to reduce the size, allowing them to deliver at quicker speeds.

You can also UNZIP a zipped file, the data in it will remain in its original format. For instance, if you have received a ZIP file as an email attachment then how can you extract the data of that file in Linux Mint? This is where UNZIP comes in handy and you can use this utility to extract the data without any data loss. So, in this article, you will learn how you can compress a ZIP file and later UNZIP it on Linux Mint.

How to install Unzip utility on Linux Mint

There are two different applications that you need to verify first in your system, whether they are already installed or not. The first one is the zip, and the second one is the unzip tool that will be used to extract the content of the zip file. You can verify their installation by utilizing the below given command.

$ unzip --version

If it is not in your distribution that install it using the command mentioned below:

$ sudo apt install unzip

If these applications are installed on your OS by default, you will also get the notification displayed below.

After installing this application, the next step is to guide you on how to extract the content of zipped files, which will be discussed in the next section.

How to unzip a zip file on Linux Mint

The syntax of unzipping a file is mentioned below:

$ unzip <file>.zip

How to unzip a zip file in the same folder: If you want to extract the content of the zip file in the same folder, then you can do that by typing the following command in the terminal.

$ unzip docs.zip

You can also unzip these two or more files at the same time by typing

$ unzip docs.zip Textfile.zip

Keep in mind that if you want to follow this process, you need to access the same folder first using the terminal where your zip files are present; otherwise, you won’t be able to do that.

How to unzip a zip file in a different folder: You can also extract the zip file on any other folder as well, and for this, we have created a new folder in the home directory that is displayed below.

Now we will extract the zip file from the Documents folder where our zip file is currently present to this newly created folder, and for that, follow the below mentioned syntax.

$unzip <location-of-the-zip-file>-d <location-where-you-want-to-extract>

And command will be:

$unzip /home/taimoor/Documents/docs.zip -d /home/taimoor/my_folder

Now there is another way to extract the zip file to another folder, and for this, you need to access that folder where that zip file is present. Like in our case, the zip files are present in the Documents folder, so we will access this folder first and then follow the below given syntax:

$ unzip <file-name>.zip -d <location-where-you-want-to-extract>

The command would be:

$ unzip docs.zip -d /home/taimoor/my_folder

How to check the content of a zip file

If you like to see the content of any zip file without extracting them first, you can do that by typing.

$ unzip -l <file-name>.zip

And to check the content of “docs.zip” file use:

$ unzip -l docs.zip

If you are interested in exploring various other unzip utility functions, you can do that by typing.

$ man unzip

There are many other applications available in the Linux Mint’s software manager that can do the same thing for you. If you are interested, you can find them by opening the software manager and then looking for the zip applications as shown below. Also, you can find those applications already installed in your system that are mentioned with a green tick.

Conclusion

UNZIP is a great utility in Linux Mint distribution to extract the data that is available in the compressed ZIP file format. One of its advantages is that the extracted data will remain in its original form without any loss. This utility has been installed on the Linux Mint by default but if you want to explore more such applications then you can do that by accessing the application manager. This article has covered all the installation and extraction procedures in detail that can help you in understanding this utility.

About the author

Taimoor Mohsin