You might think that zip files belong on Windows, not Linux systems. Still, it's a popular compression method and chances are that you'll run across them online from time to time. Either that, or your Windows buddy will send you a zip file that you want to open.
- How to unzip a zip file via command line
- How to unzip a zip file via GUI
|Category||Requirements, Conventions or Software Version Used|
|System||Any Linux disto|
|Other||Privileged access to your Linux system as root or via the
# - requires given linux commands to be executed with root privileges either directly as a root user or by use of
Unzip a zip file via command line
Your system will need a utility called "unzip" in order to extract files from zip archives, and it may or may not be installed by default already. If not, here is the command to install it on various distributions:
$ sudo apt install unzip
$ sudo pacman -S unzip
$ sudo dnf install unzip
Once the package has been installed, you can use the following command syntax to extract files from a zip archive:
$ unzip archive-name.zip
If you want to extract the files and folders to a particular directory, you can specify the directory path with the
$ unzip archive-name.zip -d /path/to/directory
Unzip a zip file via GUI
We're using GNOME in our example below. If you're using a different desktop environment, the menus may look a little different but the instructions are likely to be very similar.
To unzip a zip file, all you need to do is right click the file and select either "extract here" to extract the files into the current directory or "extract to" to specify a different directory for the files to be extracted to.
Additionally, you can simply double click on the zip archive to open it and browse the contents. From there, you can extract individual files.
In this guide, we saw how to unzip/decompress zip archives from the command line and GUI. Zip files are the most used compression format, so it's very useful to know how to open them.