How to Install 7-Zip on Linux

This guide provides straightforward instructions for installing 7-Zip across various Linux distributions using native package managers. You will learn the exact commands required to install the official modern 7-Zip release or the widely supported p7zip package on Debian, Ubuntu, Fedora, Arch Linux, and openSUSE.

Ubuntu, Debian, and Linux Mint

Modern versions of Ubuntu (22.04 and later) and Debian (12 and later) include the official 7-Zip package directly in their repositories.

Update your repository index:

sudo apt update

Install the official 7-Zip binary:

sudo apt install 7zip

If you are on an older release, you can install the legacy p7zip utility instead:

sudo apt install p7zip-full p7zip-rar

Fedora, RHEL, and CentOS

On Fedora and enterprise distributions, the package is commonly packaged as p7zip.

For Fedora:

sudo dnf install p7zip p7zip-plugins

For RHEL or CentOS (ensure the EPEL repository is enabled first):

sudo dnf install epel-release
sudo dnf install p7zip p7zip-plugins

Arch Linux and Manjaro

Arch Linux provides the modern upstream 7-Zip package in its core repositories.

Install 7-Zip using pacman:

sudo pacman -S 7zip

Alternatively, to install the older p7zip implementation:

sudo pacman -S p7zip

openSUSE

On openSUSE Leap or Tumbleweed, you can use the zypper package manager.

Install 7-Zip:

sudo zypper refresh
sudo zypper install 7zip

If the 7zip package is unavailable on older releases, install p7zip:

sudo zypper install p7zip

Alternative: Install via Snap

If your distribution has Snap enabled, you can install the standalone package universally across distributions:

sudo snap install 7zip-standalone

Verifying the Installation

Depending on which version you installed, verify the installation by checking the program version:

For modern 7-Zip:

7zz

For legacy p7zip:

7z

Running either command without arguments will display the installed version number, available commands, and supported archive formats.