Back to how-to guides

How To Unzip Files On Linux

This guide is for Linux users looking to learn about how to unzip zipped files. Before starting, let’s have a brief introduction what is unzipping.

Unzipping zipped files refers to as extraction of its contents out of the zip file.

Zip files are independent of the platform, means that if these files are zipped in windows operating system, they can be unzipped on any other operating system, having support for zip files. Here, we are going to provide you different ways to unzip files on Linux operating system.

GUI method to unzip files on Linux

Beginners like to work with graphical user interface, so, start with the easy method first. To zip files with Linux graphical interface:

  1. Locate the which you want to unzip.
  2. Right click on the file and you will have some options.
  3. Find out “Extract Here” or  “Unzip Here” option, to unzip files in the present working directory. You can also do it or other location of your choice by selecting corresponding menu.

That’s it, you have successfully unzipped on Linux using GUI.

GUI applications to unzip in Linux

Gnome archive manager for the Gnome users and Ark for others are some names of GUI utilities to zip and unzip files on Linux.

But if you want to work like a pro and want more powerful features, you have to move towards command line interface.

How to Unzip on Linux using Terminal

Command to unzip a file is:

unzip filename

Filename must include extension with it. This command will extract all file contents in the same directory where zip file exist.

To change the location for extracted material, use following command.

unzip filename -d location

Where filename is the name of the file with extension and location is the path where you want to extract the zip file contents.

For example; Unzip -d ~/

It will unzip and store its contents in home directory.

To preview contents of zip file

unzip -l

It will display all zip file contents on terminal window.

Unzip selective data from zip file

If you don’t want to unzip the whole file, understand and use following command.

unzip “content_name”

Content name is the name(s) of file you want to unzip. Suppose that you have a folder named new, and a file is placed in it called abc.txt. To unzip this file only out of the zip file, use following command.

Unzip “new/abc.txt”

GUNZIP utility

If a file is compressed with GUNZIP utility, use following command to unzip it.


If it executes without error, run next command

Tar xvf filename_tar

Unzip password protected files on Linux

Keep in mind that some files are encrypted with password at the time of zipping.

For GUI users, it will automatically prompt you to enter password for the secured zip file when you click on extract or unzip option.

For Terminal users, you have to use -p switch and give password as arguments with the command.

unzip -p password