Full .7z Installation / Source Compiling Guide
We develop and show the installation and usage of .7z!
Installing the 7-Zip Command-Line Tool (.7z Compressor) on Linux
The 7-Zip tool (invoked via the 7z command) is the primary utility for creating, extracting, and managing archives in the .7z format (and many others, including ZIP, TAR, RAR, etc.). It provides high compression ratios, strong encryption, and robust integrity checking via CRC-32.
- 7z does NOT include file repair, you need the new TOA, DAR, or PAR2 file formats for that.
As of February 2026 (7-Zip version 26.00), Linux support is excellent through three main methods:
- Distribution package managers (recommended for ease of updates and integration).
- Official pre-built binaries (for the absolute latest version with minimal setup).
- Compilation from source (for custom builds or specific optimizations).
1. Installation via Package Managers (Recommended for Most Users)
These methods integrate seamlessly with your system’s update process and enable native support in file managers (Nautilus, Dolphin, etc.).
Debian-based Distributions (Ubuntu, Debian, Linux Mint, Pop!_OS, etc.)
sudo apt update
sudo apt install p7zip-full p7zip-rar
p7zip-fullprovides the complete toolset (7z,7za,7zr).p7zip-raradds RAR support (non-free codec).
Verification:
7z i
It will produce some detailed information on all the codecs, and algorithm options it supports.
┌─[c@parrot]─[~]
└──╼ $7z i
7-Zip 25.01 (x64) : Copyright (c) 1999-2025 Igor Pavlov : 2025-08-03
64-bit locale=en_US.UTF-8 Threads:16 OPEN_MAX:1024, ASM
Libs:
0 : 25.01 : /usr/lib/7zip/7z.so
Formats:
0 C...F..........c.a.m+.. w...0 7z 7z 7 z BC AF ' 1C
0 ...................... APFS apfs img offset=32 N X S B 00
0 ...................... APM apm E R
0 ...................... Ar ar a deb udeb lib ! < a r c h > 0A
0 ...................... Arj arj ` EA
0 K.....O.....X......... Base64 b64
0 ......O............... COFF obj
0 ...F.................. Cab cab M S C F 00 00 00 00
0 ...................... Chm chm chi chq chw I T S F 03 00 00 00 ` 00 00 00
0 ...................... Compound msi msp doc xls ppt D0 CF 11 E0 A1 B1 1A E1
0 ....M................. Cpio cpio 0 7 0 7 0 || C7 q || q C7
0 ...................... CramFS cramfs offset=16 C o m p r e s s e d 20 R O M F S
0 .....G..B............. Dmg dmg k o l y 00 00 00 04 00 00 02 00
0 .........E............ ELF elf E L F
0 ...................... Ext ext ext2 ext3 ext4 img offset=1080 S EF
0 ...................... FAT fat img offset=510 U AA
0 ...................... FLV flv F L V 01
0 ...................... GPT gpt mbr offset=512 E F I 20 P A R T 00 00 01 00
0 ....M................. HFS hfs hfsx offset=1024 B D || H + 00 04 || H X 00 05
0 ...F.................. Hxs hxs hxi hxr hxq hxw lit I T O L I T L S 01 00 00 00 ( 00 00 00
0 ......O............... IHex ihex
0 ...................... Iso iso img offset=32769 C D 0 0 1
0 ...................... LP lpimg img offset=4096 g D l a 4 00 00 00
0 ...................... Lzh lzh lha offset=2 - l h
0 .......P.............. MBR mbr
0 ....M....E............ MachO macho CE FA ED FE || CF FA ED FE || FE ED FA CE || FE ED FA CF
0 ...................... MsLZ mslz S Z D D 88 F0 ' 3 A
0 ....M................. Mub mub CA FE BA BE 00 00 00 || B9 FA F1 0E
0 ...................... NTFS ntfs img offset=3 N T F S 20 20 20 20 00
0 ...F.G................ Nsis nsis offset=4 EF BE AD DE N u l l s o f t I n s t
0 .........E............ PE exe dll sys M Z
0 ...................... Ppmd pmd 8F AF AC 84
0 ...................... QCOW qcow qcow2 qcow2c Q F I FB 00 00 00
0 ...F.................. Rar rar r00 R a r ! 1A 07 00
0 ...F.................. Rar5 rar r00 R a r ! 1A 07 01 00
0 ...................... Rpm rpm ED AB EE DB
0 K..................... SWF swf F W S
0 ....M................. SWFc swf (~.swf) C W S || Z W S
0 ...................... Sparse simg img : FF & ED 01 00
0 ...................... Split 001
0 ....M................. SquashFS squashfs h s q s || s q s h || s h s q || q s h s
0 .........E............ TE te V Z
0 ...FM................. UEFIc scap BD 86 f ; v 0D 0 @ B7 0E B5 Q 9E / C5 A0 || 8B A6 < J # w FB H 80 = W 8C C1 FE C4 M || B9 82 91 S B5AB 91 C B6 9A E3 A9 C F7 / CC
0 ...FM................. UEFIf uefif offset=16 D9 T 93 z h 04 J D 81 CE 0B F6 17 D8 90 DF || x E5 8C 8C = 8A 1C O 99 5 89 a 85 C3 - D3
0 ....M.O............... Udf udf iso img offset=32768 00 B E A 0 1 01 00 || 01 C D 0 0 1
0 ...................... VDI vdi offset=64 10 DA BE
0 .....G................ VHD vhd c o n e c t i x 00 00
0 ...................... VHDX vhdx avhdx v h d x f i l e
0 ...................... VMDK vmdk K D M V
0 ...................... Xar xar pkg xip x a r ! 00
0 ...................... Z z taz (.tar) 1F 9D
0 CK..................... bzip2 bz2 bzip2 tbz2 (.tar) tbz (.tar) B Z h
0 CK.................m+.. .u..1 gzip gz gzip tgz (.tar) tpz (.tar) apk (.tar) 1F 8B 08
0 K.....O............... lzma lzma
0 K..................... lzma86 lzma86
0 C......O...LH......m+.. wu.n1 tar tar ova offset=257 u s t a r
0 C.SN.......LH..c.a.m+.. w...0 wim wim swm esd ppkg M S W I M 00 00 00
0 CK..................... xz xz txz (.tar) FD 7 z X Z 00
0 C...FMG........c.a.m+.. wud.0 zip zip z01 zipx jar xpi odt ods docx xlsx epub ipa apk appx P K 03 04 || P K 05 06 || P K 06 06 || P K 07 08 P K || P K 0 0 P K
0 K..................... zstd zst tzst (.tar) ( B5 / FD
CK.....O.....XC........ Hash sha256 sha512 sha384 sha224 sha512-224 sha512-256 sha3-224 sha3-256 sha3-384 sha3-512 sha1 sha2 sha3 sha md5 blake2s blake2b blake2sp xxh64 crc32 crc64 cksum asc
Codecs:
0 4ED 303011B BCJ2
0 EDF 3030103 BCJ
0 EDF 3030205 PPC
0 EDF 3030401 IA64
0 EDF 3030501 ARM
0 EDF 3030701 ARMT
0 EDF 3030805 SPARC
0 EDF A ARM64
0 EDF B RISCV
0 EDF 20302 Swap2
0 EDF 20304 Swap4
0 ED 40202 BZip2
0 ED 0 Copy
0 ED 40109 Deflate64
0 ED 40108 Deflate
0 EDF 3 Delta
0 ED 21 LZMA2
0 ED 30101 LZMA
0 ED 30401 PPMD
0 EDF 6F10701 7zAES
0 EDF 6F00181 AES256CBC
Hashers:
4 1 CRC32
0 4 1 CRC32
0 16 208 MD5
0 20 201 SHA1
0 32 A SHA256
0 32 231 SHA3-256
0 48 222 SHA384
0 64 223 SHA512
0 8 211 XXH64
0 8 4 CRC64
0 32 202 BLAKE2spRed Hat-based Distributions (Fedora, RHEL, Rocky Linux, AlmaLinux, CentOS Stream)
sudo dnf update
sudo dnf install p7zip p7zip-plugins
- On RHEL/Rocky/AlmaLinux (if
p7zipis unavailable), first enable EPEL:
sudo dnf install epel-release
Verification: 7z i
Arch Linux and Derivatives (Manjaro, EndeavourOS)
sudo pacman -Syu 7zip
(The package is now named 7zip, replacing the older p7zip.)
Verification: 7z i
openSUSE
sudo zypper refresh
sudo zypper install p7zip-full
Other Distributions
Search your package manager for 7zip, p7zip, or p7zip-full. Most modern distributions ship recent versions.
2. Installation of Official Pre-built Binary (Latest Version, No Dependencies)
This is the simplest way to obtain the exact official release (version 26.00 as of February 2026).
- Visit https://www.7-zip.org/download.html.
- Download the appropriate archive (e.g.,
7z2600-linux-x64.tar.xzfor 64-bit x86-64 systems; alternatives exist for x86, ARM64, ARM). - Extract:
tar -xJf 7z2600-linux-x64.tar.xz
- Install system-wide (recommended):
sudo mv 7z /usr/local/bin/
# Optional: also move helper binaries if present
sudo mv 7za 7zr /usr/local/bin/ 2>/dev/null || true
- Verify:
7z i
The binary is self-contained and works on most compatible Linux systems.
3. Compiling from Source
Compile from source if you require custom optimizations, additional codecs, or wish to build on unsupported architectures.
Prerequisites (Common to All Methods)
# Debian/Ubuntu
sudo apt install build-essential gcc g++ make
# Fedora/RHEL/Rocky/Alma
sudo dnf groupinstall "Development Tools"
# Arch
sudo pacman -S base-devel
Option A: Official 7-Zip Source (Recommended for Latest Codebase)
Download the source from https://www.7-zip.org/download.html (7z2600-src.tar.xz or .7z).
Extract:
tar -xJf 7z2600-src.tar.xz
cd 7z2600 # or the extracted directory name
Navigate to the console bundle directory and build (simple GCC method):
cd CPP/7zip/Bundles/Alone2
make -f makefile.gcc -j$(nproc)
- For the single-file
7zavariant (smaller): use directoryBundles/Alone. - For full-featured
7zz(with extra codecs in some forks): similar steps apply.
Install:
sudo make -f makefile.gcc install
Test: 7z i
Note on Optimizations: The full optimized build uses assembly code and may require the asmc assembler (or UASM as a drop-in replacement). If the build fails with “asmc: command not found,” install UASM or fall back to the pure-C GCC build above (still highly performant).
Option B: Updated p7zip Fork (Additional Codecs, e.g., Zstd, Brotli)
A popular maintained fork is available at https://github.com/jinfeihan57/p7zip (based on p7zip 22.00+ with modern enhancements).
git clone -b p7zip22.00 https://github.com/jinfeihan57/p7zip.git
cd p7zip/CPP/7zip/Bundles/Alone2
make -f makefile.gcc -j$(nproc)
sudo make -f makefile.gcc install
Verification: ./_o/7zz i (or 7zz i after install).
Legacy p7zip Source (for Reference Only)
p7zip has not been updated since 2016 (v16.02). Use only if needed for compatibility:
- Download from https://sourceforge.net/projects/p7zip/files/
- Extract, run
make, thensudo ./install.sh.
Post-Installation Notes
- Usage example:
7z a archive.7z folder/(create),7z x archive.7z(extract),7z t archive.7z(test integrity). - GUI integration: Most desktop environments automatically use the installed
7zfor .7z files. - RAR support: Install
p7zip-rar(Debian) or equivalent; it is non-free and may require a separate package. - Updates: Prefer package-manager installations for automatic security updates. For the official binary or source builds, repeat the process when new versions are released.
If you encounter any distribution-specific issues or require support for a particular architecture/version, provide details for more tailored guidance. The methods above cover all standard Linux environments as of February 2026.