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
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.
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“.
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.
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.
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.
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.
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“.
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.
Then, I’ll browse for the desired Destination where I need to save the extracted version and click “Select“.
As a result, the desired folder now contains the extracted “testfile” version.
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