How to Unzip Zip files in Linux using unzip Command

In this tutorial we are going to learn how to unzip zip files in Linux Operating System. The Zip file compression Format mostly used in Microsoft Window and often you will need to unzip zip files that ported from a windows computer.

  1. Install Unzip Command on Linux.
  2. Unzip zip files in Linux with unzip command.

To unzip zip file in Linux, we need to install unzip package. After we install unzip command, we can extract zip file from the command line or from the GUI, if you are using Linux Desktop.

Install Unzip on Linux Operating System

So first we need to install unzip command on Linux. To install unzip on a Redhat Based Linux distribution, use the yum install command. For Debian Based Linux Distribution, use apt-get command to install unzip.

Install Unzip on Redhat / CentOS / Fedora / Oracle Linux

For Redhat based Linux distributions use yum  command to install unzip command.

yum install unzip

Install Unzip on Debian / Ubuntu / Linux Mint

For Debian based Linux distributions, use apt-get install command to install unzip package.

sudo apt-get install unzip

Unzip Zip Files with unzip command in Linux

After Installing unzip package, Now we can unzip zip files in Linux using the unzip command.

unzip file.zip
How to Unzip Zip files in Linux using unzip Command
Extract Zip File with Unzip Command in Linux
  • The unzip command works same across all Linux Distributions.
  • By default zip file will extract to the current working directory.
  • If the zip file is password protected, unzip command will prompt for the Password.

Extract zip file to Different Directory in Linux

With -d option we can specify the directory which we want to extract zip file.

unzip -d /opt file.zip

As per the above example, file.zip archive will extract to the /opt directory.

Unzip Zip files in Linux Desktop

If you are using a Linux Desktop, You can use the GUI to unzip zip files. But remember, Still you have to install unzip package.

To unzip a zip file From GUI, Right click on the zip file and click “Extract Here”.

Unzip Zip files in Linux Desktop

Summary - How to Extract Zip file in Linux using unzip command

In this Tutorial we learned how to unzip zip files in Linux operating System.

  • To unzip zip files in Linux, We need to install unzip package.
  • We installed unzip on Redhat Based Linux Distributions using yum command. For Debian Based Linux Distributions, We used apt-get command to install unzip command.
  • Then we used, unzip command to extract zip files in Linux.