Linux

How to Unzip a Zip file in Linux

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.

What is Unzip?

Unzip is a utility that helps you extract compressed files from a ZIP file.

How to Install Unzip on Linux

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.

Install Unzip in Ubuntu and Debian

sudo apt install unzip

Install Unzip on Arch Linux or Manjaro

sudo pacman -S unzip

And to install Unzip on Fedora or CentOS

sudo yum install unzip

These commands will install Unzip utility on your system.

How to Unzip a zip file

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.

How to Unzip a ZIP file to a different 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.

Unzip zip files in Linux using GUI

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.

Akash

Recent Posts

Linux Software must have to improve Productivity

You can utilize a wide range of tools as a Linux user to keep organized, manage your time, and become… Read More

2 years ago

How to get Complete details of an Audio Video File

Have you ever caught yourself in a situation where you need details of an audio/ video media file? When you… Read More

4 years ago

Fix Windows 10 showing wrong time in dual boot with Linux

If you have installed Linux alongside windows in the dual boot you might have noticed that every time you boot… Read More

4 years ago

How to update Linux Kernel to the latest version easily

Linux kernel is like the core of the operating system. It's a piece of software that works as a middle… Read More

4 years ago

3 Methods for How to Install Python on Linux System

Nowadays, most Linux Distros already have Python preinstalled. But you might have a distribution that might not have Python preinstalled.… Read More

4 years ago

How to Install Python on Windows 10 to begin coding

Python is one of the most popular and easy to learn programming languages. Its a widely used high-level programming language… Read More

4 years ago

Just so that you know we use cookies on our website. Want to know more

read here