ZIP is the most widely file extension used format for compressing files without losing data. A ZIP file, like other archive file formats, is simply a collection of files and folders compressed into a single file for easy sharing and transporting.
But when you want to use the files inside the ZIP file, you need to extract it. To extract these files you need to use a tool like Unzip in Linux. So here in this tutorial, we show you how to unzip a zip file in Linux PC.
Unzip is a utility that helps you extract compressed files from a ZIP file.
Unzip might not be installed by default in your Linux OS. But its quite easy to install Unzip, just type the command below in the terminal depending on your distro.
sudo apt install unzip
sudo pacman -S unzip
sudo yum install unzip
These commands will install Unzip utility on your system.
When you are done installing Unzip just navigate to the place where the zip file is located and open a terminal there. You can also open that directory in the terminal by using the cd command.
In terminal type the command below to extract the data from ZIP file. The file will be extracted in the same directory where the ZIP file is present.
unzip filename.zip
For example, if you have a file in Downloads, first type cd Downloads in the terminal. And then type unzip filename.zip.
Although to extract a ZIP file into a directory, the user needs to have write permissions of that directory.
Unzip command by default extracts files in the current directory, that is the is directory where the file is present. This is not a good thing as it will dump all the contents of the zip file which might be more than 100 files. So To extract files in a different folder or directory use the command below.
unzip filename.zip -d /path/of/directory
For example, if you have a file in Downloads that you want to unzip in a folder named NewFolder inside Downloads then use the command below.
sudo unzip filename.zip -d /NewFolder
If the directory does not exist then this command will create one.
You can even Unzip ZIP files without opening the terminal every time. Open file manager and navigate to the location of the ZIP file. Right-Click on the file and select Extract here.
This is how to unzip a zip file in Linux. We hope you like the article, if you have any questions do ask in comments we would love to help you.
If you are interested in trying new Linux Operating systems than here how to install Elementary OS – A very elegant and sleek Linux OS for beginners.
You can utilize a wide range of tools as a Linux user to keep organized, manage your time, and become… Read More
Have you ever caught yourself in a situation where you need details of an audio/ video media file? When you… Read More
If you have installed Linux alongside windows in the dual boot you might have noticed that every time you boot… Read More
Linux kernel is like the core of the operating system. It's a piece of software that works as a middle… Read More
Nowadays, most Linux Distros already have Python preinstalled. But you might have a distribution that might not have Python preinstalled.… Read More
Python is one of the most popular and easy to learn programming languages. Its a widely used high-level programming language… Read More
Just so that you know we use cookies on our website. Want to know more
read here