How To Unzip Files in Linux - 8 Easy Methods
3 min. read
Published on
Read our disclosure page to find out how can you help MSPoweruser sustain the editorial team Read more
![how to unzip files in linux](https://mspoweruser.com/wp-content/uploads/2023/12/how-to-unzip-files-in-linux-700x500.png)
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](https://mspoweruser.com/wp-content/uploads/2023/12/unzipping-files-in-Linux-using-unzip-command.png)
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](https://mspoweruser.com/wp-content/uploads/2023/12/unzipping-files-in-Linux-using-tar-command.png)
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](https://mspoweruser.com/wp-content/uploads/2023/12/unzipping-files-in-Linux-using-gzip-command.png)
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](https://mspoweruser.com/wp-content/uploads/2023/12/unzipping-files-in-Linux-using-gunzip-command.png)
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](https://mspoweruser.com/wp-content/uploads/2023/12/unzipping-files-in-Linux-using-xz-command.png)
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](https://mspoweruser.com/wp-content/uploads/2023/12/unzipping-files-in-Linux-using-bunzip2-command.png)
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](https://mspoweruser.com/wp-content/uploads/2023/12/unzipping-files-in-Linux-using-7z-command.png)
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](https://mspoweruser.com/wp-content/uploads/2023/12/using-extract-to.-option-for-file-extraction.png)
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](https://mspoweruser.com/wp-content/uploads/2023/12/selecting-destination-directory-for-file-extraction.png)
As a result, the desired folder now contains the extracted “testfile” version.
![testfile file extraction](https://mspoweruser.com/wp-content/uploads/2023/12/file-extraction-has-been-done-successfully.png)
You may also be interested in:
- Linux List Groups
- Truncate File Linux
- Linux Remove User From Group
- How To Delete a User in Linux
- Move Directory Linux
So, now you know how to unzip files in Linux. Feel free to share your feedback in the comments below!
User forum
0 messages