Command To Unzip Zip File In Linux

2 min read

The command to unzip a zip file in Linux is unzip, a lightweight utility that unpacks .And zip archives from the terminal in seconds. This guide walks through the exact syntax, the flags that actually matter in daily work, how to extract into a specific directory, how to handle password-protected and broken archives, and what to do when unzip is not installed on your distribution.

Introduction: Why the unzip Command Still Matters

Even in an age of tar.gz and container images, the zip format refuses to disappear. Software vendors ship plugins as .zip, banks send statements as .Which means zip, Android tooling expects . zip, and Windows colleagues default to it. On a headless server with no graphical file manager, the only way in is the terminal.

The good news is that Linux handles zip archives natively through the Info-ZIP unzip package, which is preinstalled on most desktop distributions and available in every major package repository. Once you learn roughly a dozen options, you can extract, inspect, test, and selectively restore almost any archive without ever leaving the shell.

Installing the unzip Utility

If typing unzip returns command not found, install it with your distribution's package manager:

  • Debian / Ubuntu / Linux Mint: sudo apt install unzip
  • Fedora / RHEL / Rocky / Alma: sudo dnf install unzip
  • CentOS 7 and older: sudo yum install unzip
  • Arch Linux / Manjaro: sudo pacman -S unzip
  • openSUSE: sudo zypper install unzip
  • Alpine Linux: apk add unzip

Verify the installation with unzip -v, which prints the version number along with build details.

Basic Syntax: The Command to Unzip a Zip File in Linux

The minimal form is disarmingly short:

unzip archive.zip

This extracts every file in archive.Still, zip into your current working directory, recreating the internal folder structure exactly as it was packed. Before running it, confirm where you are with pwd, because unzip will happily scatter files across whatever directory you happen to be standing in.

The general structure is:

unzip [options] archive.zip [file(s) to extract] [-x file(s) to exclude]

Notice that options come before the archive name. Day to day, writing unzip archive. zip -l often still works, but keeping flags first avoids surprises.

Listing Contents Without

Just Came Out

Current Reads

Explore the Theme

Familiar Territory, New Reads

Thank you for reading about Command To Unzip Zip File In Linux. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home