If you need to create or extract .zip archives on Linux, the packages you want are usually zip and unzip. On most distributions, they are installed through the distro’s standard package manager, such as apt, dnf, pacman, zypper, or apk.
How to check if zip and unzip are already installed
Before installing anything, run:
zip -v
unzip -vIf both commands return version information, you already have them installed. If the shell says command not found, install them using your distribution’s package manager.
Install zip and unzip on Ubuntu and Debian
Ubuntu and Debian use apt for package management.
Use:
sudo apt update
sudo apt install zip unzipThat is the standard command for Ubuntu, Debian, Linux Mint, Pop!_OS, and most other Debian-based distributions.
Install zip and unzip on Fedora
Fedora uses dnf for package management.
Run:
sudo dnf install zip unzipThat works on current Fedora releases.
Install zip and unzip on RHEL, Rocky Linux, AlmaLinux, and CentOS Stream
Red Hat documents dnf as the standard package tool for modern RHEL systems, and CentOS Stream also centers package installation around DNF repositories. On older Enterprise Linux systems, yum may still be used as a compatibility command, but dnf is the current standard on supported releases.
Use on modern systems:
sudo dnf install zip unzipOn older systems where yum is still the expected command, this usually works:
sudo yum install zip unzipFor Rocky Linux, AlmaLinux, Oracle Linux, and CentOS Stream, the dnf command is generally the right choice because they follow the RHEL package management model.
Install zip and unzip on Arch Linux and Manjaro
Arch Linux uses pacman for package management, and ArchWiki documents pacman as the standard tool for installing packages. Arch’s package archive also shows unzip as an official package.
Run:
sudo pacman -S zip unzipThis command also works on Arch-based distributions such as Manjaro, EndeavourOS, and Garuda Linux.
Install zip and unzip on openSUSE Leap and Tumbleweed
openSUSE uses zypper, and openSUSE documentation explicitly says zypper is the command-line package manager for installing, updating, and removing software.
Use:
sudo zypper install zip unzipYou can also use the shorter form:
sudo zypper in zip unzipBoth are common on openSUSE systems.
Install zip and unzip on Alpine Linux
Alpine Linux uses apk for installing additional software.
Run:
sudo apk add zip unzipBecause Alpine is minimal by design, it is fairly common to install these tools manually on fresh systems or containers.
Install zip and unzip on Gentoo
Gentoo usually installs software with Portage using emerge. A typical install command is:
sudo emerge app-arch/zip app-arch/unzipInstall zip and unzip on Void Linux
Void Linux uses xbps-install. The usual command is:
sudo xbps-install -S zip unzipHow to verify the installation
After installation, check that both tools work:
zip -v
unzip -vYou can also test them quickly:
Create a ZIP file:
First create a file:
touch file1.txtAnd now archive that file by using zip:
zip test.zip file1.txtNow extract the ZIP file that you just created:
unzip test.zipCommon install issues
If you get a permissions error, make sure you are using sudo. If the package cannot be found, update the package index first using your distro’s normal refresh command such as apt update, dnf makecache, pacman -Sy, zypper refresh, or apk update, depending on the system.
Final takeaway
On most Linux distributions, installing ZIP support is just one command away. Debian-based systems use apt install zip unzip, Fedora and RHEL-style systems use dnf install zip unzip, Arch uses pacman -S zip unzip, openSUSE uses zypper in zip unzip, and Alpine uses apk add zip unzip. Once installed, zip handles archive creation and unzip handles extraction.
FAQ
How do I install zip and unzip on Ubuntu?
Run sudo apt update && sudo apt install zip unzip.
How do I install zip and unzip on Fedora or RHEL?
Use sudo dnf install zip unzip.
How do I install zip and unzip on Arch Linux?
Run sudo pacman -S zip unzip.
How do I install zip and unzip on openSUSE?
Use sudo zypper install zip unzip.
How do I install zip and unzip on Alpine Linux?
Run sudo apk add zip unzip.
How do I check if zip and unzip are already installed?
Run zip -v and unzip -v in the terminal.
What is the difference between zip and unzip on Linux?zip creates compressed ZIP archives, while unzip extracts them.
Do I need both zip and unzip installed?
Yes, if you want to both create and extract ZIP files on Linux.
