How To Unzip Files in Linux - 8 Easy Methods

Reading time icon 3 min. read


Readers help support MSpoweruser. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help MSPoweruser sustain the editorial team Read more

how to unzip files in linux

Don’t know how to unzip files in Linux? For this, you can use:

1. Using the unzip Command

In Linux, the unzip command extracts files from a compressed ZIP archive and then restores them to their original directory structure and format.

Simply press CTRL+ALT+T to open your terminal, type “unzip filename.zip“, and hit Enter.

unzipping files in Linux using unzip command

In my case, the unzip command extracts the “file1.zip” archive.

2. Using the tar Command

tar archives and bundles multiple directories and files into a single file. Additionally, this command is used to facilitate distribution, efficient storage, and backup operation.

To unzip a file with the tar command, I’ll type “tar filename.tar.xz“.

unzipping files in Linux using tar command

3. Using the gzip Command

gzip uses the GNU zip algorithm to compress files, reduce their sizes, and create a compressed file with the “.gz” extension. Moreover, you can also execute it to unzip files on your system.

To do so, I’ll run the “gzip -d filename.gz” command.

unzipping files in Linux using gzip command

4. Using the gunzip Command

Likewise, the gunzip command is also used for decompressing the files compressed with gzip. More specifically, it restores them to their original state.

For this purpose, I’ll type the “gunzip filename” command and hit Enter.

unzipping files in Linux using gunzip command

5. Using the xz Command

xz uses the LZMA compression algorithm to compress files. However, adding the “-d” option forces xz to unzip or decompress the given file.

Now, I’ll execute “xz -d filename.xz” on my terminal.

unzipping files in Linux using xz command

6. Using the bunzip2 Command

The bunzip2 utility is used to decompress the files compressed with bzip2. Consequently, it returns them to their original format.

Below, I’ll run the “bunzip2 filename.bz2” command.

unzipping files in Linux using bunzip2 command

7. Using the 7z Command

7z extracts files from the compressed 7z archives. Moreover, it offers different encryption options and also supports several compression methods.

To unzip a file ending with the “.7z” extension, I’ll type in “7z e filename.7z“.

unzipping files in Linux using 7z command

8. Using the GUI

You can also use the GUI or Graphical User Interface to unzip files with ease.

For instance, to unzip my “testfile.zip“, I’ll right-click on it, and select the “Extract to…” option from the context menu.

using extract to.. option for file extraction

Then, I’ll browse for the desired Destination where I need to save the extracted version and click “Select“.

selecting destination directory for file extraction

As a result, the desired folder now contains the extracted “testfile” version.

testfile file extraction

You may also be interested in:

So, now you know how to unzip files in Linux. Feel free to share your feedback in the comments below!

More about the topics: Files, linux

Leave a Reply

Your email address will not be published. Required fields are marked *