Skip to main content

Installing 7-Zip

7-Zip is available for Windows, Linux, and macOS. This guide covers multiple installation methods for each platform.

Windows Installation

The easiest way to install 7-Zip on Windows is using the official installer:
1

Download the installer

Visit 7-zip.org and download the appropriate installer:
  • 64-bit Windows: 7z####-x64.exe (recommended for modern systems)
  • 32-bit Windows: 7z####.exe
  • ARM64 Windows: 7z####-arm64.exe (for ARM-based Windows devices)
2

Run the installer

Double-click the downloaded executable and follow the installation wizard. The default installation directory is C:\Program Files\7-Zip\.
3

Verify installation

Open Command Prompt and verify 7-Zip is installed:
"C:\Program Files\7-Zip\7z.exe" --help
You should see the 7-Zip help output with version information.
4

Add to PATH (optional)

To use 7z from any directory, add 7-Zip to your system PATH:
  1. Open System Properties → Environment Variables
  2. Edit the Path variable
  3. Add C:\Program Files\7-Zip\
  4. Click OK and restart Command Prompt
The Windows installer includes 7-Zip File Manager (7zFM.exe), Windows Shell integration, and all command-line tools.

Linux Installation

Install 7-Zip using APT package manager:
sudo apt update
sudo apt install 7zip
Or install the older p7zip package (note: outdated):
sudo apt install p7zip-full p7zip-rar
The 7zip package provides the modern 7-Zip version. The p7zip packages are based on an older 7-Zip version (16.02) and may not include the latest features.

macOS Installation

Install 7-Zip using Homebrew:
brew install 7zip
Or install p7zip (older version):
brew install p7zip
Verify installation:
7zz --help

Available Binaries

7-Zip provides different binaries for different use cases:
BinaryDescriptionFormat Support
7z (Windows)Full-featured command-line versionAll formats
7zz (Linux/macOS)Standalone console versionAll formats
7zaStandalone reduced version7z, xz, cab, zip, gzip, bzip2, tar
7zrMinimal standalone version7z only
7zG (Windows)GUI applicationAll formats
7zFM (Windows)File Manager interfaceAll formats
On Linux and macOS, the primary binary is 7zz. On Windows, both 7z.exe and 7zz.exe are available, with 7z.exe being the traditional name.

Verifying Installation

After installation, verify 7-Zip is working correctly:
# Check version
7zz --help | head -n 3

# Test compression
7zz a test.7z /etc/hosts

# List archive contents
7zz l test.7z

# Extract archive
7zz x test.7z

Differences: 7-Zip vs p7zip

There are two different Linux/macOS ports of 7-Zip:
  1. 7-Zip for Linux/macOS - Modern official port with all latest features from 7-Zip for Windows
  2. p7zip - Independent port, now outdated (last version 16.02)
The modern 7-Zip package is recommended for all new installations.

Troubleshooting

Command not found

If you get “command not found” after installation: Linux/macOS:
# Find 7-Zip installation
which 7zz
which 7z

# Add to PATH if needed
export PATH="$PATH:/usr/local/bin"
Windows:
# Use full path
"C:\Program Files\7-Zip\7z.exe" --help

# Or add to PATH in Environment Variables

Permission denied (Linux/macOS)

If you get permission errors:
sudo chmod +x /usr/local/bin/7zz

Missing dependencies

If compilation fails with missing dependencies:
# Debian/Ubuntu
sudo apt install build-essential

# Fedora/RHEL
sudo dnf groupinstall "Development Tools"

Next Steps

Quick Start Guide

Now that 7-Zip is installed, learn the basic commands to compress and extract files

Build docs developers (and LLMs) love