Archive work on Fedora is mostly a command-name decision: Fedora’s normal 7zip package gives you 7z, Fedora’s optional standalone package gives you 7zz, and the official upstream tarball gives you the newest upstream 7zz binary. To install 7-Zip on Fedora Linux, start with DNF unless you specifically need upstream’s latest release or its RAR/RAR5 extraction handlers.
Fedora Linux 44 currently ships 7-Zip 25.01 through the Fedora repositories. The official 7-Zip Linux tarball is newer at the time of writing, but it installs outside RPM ownership under /usr/local/bin. That source difference controls update commands, removal commands, and whether 7z or 7zz appears in your shell.
Install 7-Zip on Fedora Linux
Use Fedora’s package repositories for the standard install path. DNF keeps the package in RPM ownership, includes it in normal system upgrades, and avoids shadowing Fedora files with a manually copied binary.
Choose a 7-Zip Installation Method on Fedora
Choose the method by command name, update owner, and archive-format needs. Most readers should install 7zip first and add another path only when the workflow requires it.
| Method | Source | Main Command | Update Behavior | Best For |
|---|---|---|---|---|
| DNF standard package | Fedora repositories | 7z | Included in sudo dnf upgrade --refresh | Most compression, extraction, listing, testing, and encryption tasks |
| DNF standalone all package | Fedora repositories | 7zz | Included in sudo dnf upgrade --refresh | Users who want Fedora’s packaged 7zz command |
| Official upstream binary | 7-Zip download page and GitHub releases | 7zz | Manual replacement or helper script | Newest upstream release, RAR/RAR5 extraction, or no-DNF environments |
On Fedora 44, the packaged 7z and 7zz builds do not list RAR or RAR5 handlers. The official upstream 7zz binary does list Rar and Rar5. For dedicated RAR tooling instead of 7-Zip, install UnRAR on Fedora.
Update Fedora Packages Before Installing 7-Zip
Refresh Fedora metadata and apply pending package updates before adding 7-Zip:
sudo dnf upgrade --refresh
These commands use
sudofor system package changes. If your account cannot run administrator commands yet, follow the Fedora guide to add a user to sudoers.
If you want more package-manager context before confirming transactions, the DNF5 install examples for Fedora explain install, upgrade, and removal behavior in more detail.
Install Fedora 7zip Package
Install the standard Fedora package when you want the normal 7z command:
sudo dnf install 7zip
Confirm that RPM knows about the installed package:
rpm -q 7zip
Example output from Fedora 44:
7zip-25.01-5.fc44.x86_64
The exact release suffix changes as Fedora updates the package. The important check is that the output starts with 7zip- and matches your Fedora release.
Verify the command path and first version line:
command -v 7z
7z | sed -n '/^7-Zip/p' | head -n 1
/usr/bin/7z 7-Zip 25.01 (x64) : Copyright (c) 1999-2025 Igor Pavlov : 2025-08-03
Install Fedora 7zz Package
Install 7zip-standalone-all only when you want Fedora’s packaged 7zz command. This stays DNF-managed, but it is not the same as the newest upstream tarball.
sudo dnf install 7zip-standalone-all
Verify the package, command path, and version:
rpm -q 7zip-standalone-all
command -v 7zz
7zz | sed -n '/^7-Zip/p' | head -n 1
7zip-standalone-all-25.01-5.fc44.x86_64 /usr/bin/7zz 7-Zip (z) 25.01 (x64) : Copyright (c) 1999-2025 Igor Pavlov : 2025-08-03
Compare Fedora 7-Zip Package Commands
Fedora publishes several 7-Zip package variants from the same source package. Install only the command surface you actually need:
| Package | Command | Role | Typical Choice |
|---|---|---|---|
7zip | 7z | Main Fedora package for normal archive work | Recommended default |
7zip-standalone-all | 7zz | Standalone Fedora package with the upstream-style command name | Use when scripts require 7zz |
7zip-standalone | 7za | Standalone package for a smaller format set | Specialized compatibility only |
7zip-reduced | 7zr | Reduced package for 7z-only workflows | Minimal or constrained systems |
Install Official 7-Zip 7zz Binary on Fedora Linux
The official Linux tarball is useful when Fedora’s packaged version is not enough, when you need upstream RAR/RAR5 extraction, or when a managed shell cannot use DNF. This method installs 7zz under /usr/local/bin, so it is maintained separately from RPM packages.
The upstream binary can coexist with Fedora’s
7zpackage because the command names differ. If you also install Fedora’s7zip-standalone-all,/usr/local/bin/7zzusually appears before/usr/bin/7zzonPATHand shadows the Fedora package command.
Install Manual Method Prerequisites
Install the small tools used to fetch, extract, and verify the upstream tarball:
sudo dnf install curl tar xz python3
The commands use curl for downloads and Fedora’s standard tar and xz tools for extraction.
Detect the Correct 7-Zip Linux Architecture
Map Fedora’s machine architecture to the official 7-Zip asset name. Keep the same terminal open because later commands reuse SEVENZIP_ARCH.
detect_7zip_arch() {
case "$(uname -m)" in
x86_64) SEVENZIP_ARCH="x64" ;;
aarch64) SEVENZIP_ARCH="arm64" ;;
armv7l|armv6l) SEVENZIP_ARCH="arm" ;;
i386|i686) SEVENZIP_ARCH="x86" ;;
*) printf 'Unsupported architecture: %s\n' "$(uname -m)" >&2; return 1 ;;
esac
printf '7-Zip Linux architecture: %s\n' "$SEVENZIP_ARCH"
}
detect_7zip_arch
7-Zip Linux architecture: x64
Resolve the Official 7-Zip Release Asset
Resolve the current Linux tarball URL and SHA-256 digest from the official 7-Zip GitHub release metadata. The 7-Zip download page links to these Linux release assets, while GitHub exposes the digest used for verification.
resolve_7zip_asset() {
if [ -z "${SEVENZIP_ARCH:-}" ]; then
printf 'SEVENZIP_ARCH is not set; run the architecture detection step first.\n' >&2
return 1
fi
release_json="$(curl -fsSL https://api.github.com/repos/ip7z/7zip/releases/latest)"
if ! asset_info="$(
RELEASE_JSON="$release_json" ARCH_TAG="linux-${SEVENZIP_ARCH}" python3 - <<'PY'
import json
import os
import sys
release = json.loads(os.environ["RELEASE_JSON"])
arch = os.environ["ARCH_TAG"]
for asset in release.get("assets", []):
name = asset.get("name", "")
if name.startswith("7z") and name.endswith(f"{arch}.tar.xz"):
digest = asset.get("digest") or ""
if digest.startswith("sha256:"):
digest = digest.split(":", 1)[1]
if not digest:
sys.exit("Selected asset has no SHA256 digest")
print(release.get("tag_name", ""))
print(name)
print(asset["browser_download_url"])
print(digest)
sys.exit(0)
sys.exit(f"No 7-Zip {arch} tarball found in the latest release")
PY
)"; then
return 1
fi
SEVENZIP_VERSION="$(printf '%s\n' "$asset_info" | sed -n '1p')"
ARCHIVE_NAME="$(printf '%s\n' "$asset_info" | sed -n '2p')"
DOWNLOAD_URL="$(printf '%s\n' "$asset_info" | sed -n '3p')"
ASSET_SHA256="$(printf '%s\n' "$asset_info" | sed -n '4p')"
printf 'Version: %s\n' "$SEVENZIP_VERSION"
printf 'Asset: %s\n' "$ARCHIVE_NAME"
printf 'URL: %s\n' "$DOWNLOAD_URL"
printf 'SHA256: %s\n' "$ASSET_SHA256"
}
resolve_7zip_asset
A successful run prints the upstream version, archive name, download URL, and SHA-256 digest. Keep the same terminal open because the download step reuses DOWNLOAD_URL, ARCHIVE_NAME, and ASSET_SHA256.
Download and Test Official 7zz
Download the archive, verify the published SHA-256 digest, and extract it into a user-owned staging directory:
mkdir -p "$HOME/Downloads"
rm -rf "$HOME/7zip-install"
mkdir -p "$HOME/7zip-install"
cd "$HOME/Downloads"
rm -f "$ARCHIVE_NAME"
curl -fsSLo "$ARCHIVE_NAME" "$DOWNLOAD_URL"
printf '%s %s\n' "$ASSET_SHA256" "$ARCHIVE_NAME" | sha256sum -c -
tar xf "$ARCHIVE_NAME" -C "$HOME/7zip-install"
test -x "$HOME/7zip-install/7zz"
Check the upstream binary before copying it into a system path:
"$HOME/7zip-install/7zz" | sed -n '/^7-Zip/p' | head -n 1
7-Zip (z) 26.01 (x64) : Copyright (c) 1999-2026 Igor Pavlov : 2026-04-27
Confirm that the official upstream binary lists RAR and RAR5 extraction handlers:
"$HOME/7zip-install/7zz" i | grep -E 'Rar|Rar5'
...F.................. Rar rar r00 R a r ! 1A 07 00
...F.................. Rar5 rar r00 R a r ! 1A 07 01 00
D 40301 Rar1
D 40302 Rar2
D 40303 Rar3
D 40305 Rar5
Install Official 7zz System-Wide
Install the tested binary under /usr/local/bin. The install command copies the file and sets executable permissions in one step.
sudo install -m 755 "$HOME/7zip-install/7zz" /usr/local/bin/7zz
command -v 7zz
/usr/local/bin/7zz
Run a final version check from the installed path:
7zz | sed -n '/^7-Zip/p' | head -n 1
7-Zip (z) 26.01 (x64) : Copyright (c) 1999-2026 Igor Pavlov : 2026-04-27
Create the Official 7-Zip Update Helper
The upstream binary is manual, so create an updater that queries the latest GitHub release, selects the correct Linux asset, verifies the published SHA-256 digest, and replaces /usr/local/bin/7zz only when needed.
sudo tee /usr/local/bin/update-7zip-official > /dev/null <<'EOF'
#!/usr/bin/env bash
set -euo pipefail
api_url="https://api.github.com/repos/ip7z/7zip/releases/latest"
cache_dir="${XDG_CACHE_HOME:-$HOME/.cache}/7zip-official-updater"
install_dir="/usr/local/bin"
need_cmd() {
command -v "$1" >/dev/null 2>&1 || {
printf 'Missing required command: %s\n' "$1" >&2
exit 1
}
}
for cmd in curl tar python3 sha256sum install awk; do
need_cmd "$cmd"
done
case "$(uname -m)" in
x86_64) arch_tag="linux-x64" ;;
aarch64) arch_tag="linux-arm64" ;;
armv7l | armv6l) arch_tag="linux-arm" ;;
i386 | i686) arch_tag="linux-x86" ;;
*)
printf 'Unsupported architecture: %s\n' "$(uname -m)" >&2
exit 1
;;
esac
release_json="$(curl -fsSL "$api_url")"
asset_info="$(
RELEASE_JSON="$release_json" ARCH_TAG="$arch_tag" python3 - <<'PY'
import json
import os
import sys
release = json.loads(os.environ["RELEASE_JSON"])
arch = os.environ["ARCH_TAG"]
for asset in release.get("assets", []):
name = asset.get("name", "")
if name.startswith("7z") and name.endswith(f"{arch}.tar.xz"):
digest = asset.get("digest") or ""
if digest.startswith("sha256:"):
digest = digest.split(":", 1)[1]
if not digest:
sys.exit("Selected asset has no SHA256 digest")
print(release.get("tag_name", ""))
print(name)
print(asset["browser_download_url"])
print(digest)
sys.exit(0)
sys.exit(f"No 7-Zip {arch} tarball found in the latest release")
PY
)"
latest_version="$(printf '%s\n' "$asset_info" | sed -n '1p')"
asset_name="$(printf '%s\n' "$asset_info" | sed -n '2p')"
asset_url="$(printf '%s\n' "$asset_info" | sed -n '3p')"
asset_sha256="$(printf '%s\n' "$asset_info" | sed -n '4p')"
if [ -x "$install_dir/7zz" ]; then
current_version="$("$install_dir/7zz" | awk '/^7-Zip/ {for (i=1; i<=NF; i++) if ($i ~ /^[0-9]+[.][0-9]+/) {print $i; exit}}')"
else
current_version="not installed"
fi
printf 'Architecture: %s\n' "$arch_tag"
printf 'Current version: %s\n' "$current_version"
printf 'Latest version: %s\n' "$latest_version"
if [ "$current_version" = "$latest_version" ]; then
printf '7-Zip is already current at %s/7zz\n' "$install_dir"
exit 0
fi
rm -rf "$cache_dir/extract"
mkdir -p "$cache_dir/extract"
archive="$cache_dir/$asset_name"
printf 'Downloading %s\n' "$asset_url"
curl -fL --retry 3 -o "$archive" "$asset_url"
printf '%s %s\n' "$asset_sha256" "$archive" | sha256sum -c -
tar xf "$archive" -C "$cache_dir/extract"
if [ ! -x "$cache_dir/extract/7zz" ]; then
printf 'Downloaded archive did not contain an executable 7zz binary\n' >&2
exit 1
fi
if [ "$(id -u)" -eq 0 ]; then
install -m 755 "$cache_dir/extract/7zz" "$install_dir/7zz"
elif command -v sudo >/dev/null 2>&1; then
sudo install -m 755 "$cache_dir/extract/7zz" "$install_dir/7zz"
else
printf 'Root privileges are required to install %s/7zz\n' "$install_dir" >&2
exit 1
fi
"$install_dir/7zz" | sed -n '/^7-Zip/p' | head -n 1
EOF
sudo chmod 755 /usr/local/bin/update-7zip-official
Run the helper whenever you want to refresh the official binary:
update-7zip-official
A no-op run prints the detected architecture, current version, latest version, and a message that the installed binary is already current.
Architecture: linux-x64 Current version: 26.01 Latest version: 26.01 7-Zip is already current at /usr/local/bin/7zz
Use 7-Zip Commands on Fedora Linux
Understand 7z and 7zz Command Differences
The 7z command comes from Fedora’s standard 7zip package. The 7zz command comes from Fedora’s 7zip-standalone-all package or from the official upstream binary. Syntax is mostly the same for everyday archive work, so replace 7z with 7zz when you chose a 7zz method.
| Subcommand | Action | Example |
|---|---|---|
a | Create an archive or add files | 7z a archive.7z files/ |
l | List archive contents | 7z l archive.7z |
x | Extract with full paths | 7z x archive.7z |
e | Extract into one flat directory | 7z e archive.7z |
u | Update files inside an archive | 7z u archive.7z file.txt |
d | Delete stored paths from an archive | 7z d archive.7z old.txt |
t | Test archive integrity | 7z t archive.7z |
Create a Practice Archive
Create a small practice directory so the command examples use disposable files under your home directory:
The setup command recreates
~/archive-demo. Move an existing directory with that name before running it.
rm -rf "$HOME/archive-demo"
mkdir -p "$HOME/archive-demo/project/logs"
printf 'alpha\n' > "$HOME/archive-demo/project/readme.md"
printf 'setting=1\n' > "$HOME/archive-demo/project/config.txt"
printf 'log\n' > "$HOME/archive-demo/project/logs/app.log"
printf 'cache\n' > "$HOME/archive-demo/project/cache.tmp"
cd "$HOME/archive-demo"
Create a 7z archive from the practice directory:
7z a project.7z project
Use ZIP instead when you need the broadest Windows, macOS, and desktop compatibility:
7z a project.zip project
List Archive Contents Before Extracting
Inspect an archive before unpacking it into the current directory:
7z l project.7z
The Name column shows the paths that extraction will recreate. If the archive contains a top-level project/ directory, normal extraction restores that directory.
Extract Archives with Full Paths or Flat Output
Use x for normal extraction because it preserves folder paths. The -o switch chooses the output directory, and 7-Zip expects the path to touch the switch with no space.
7z x project.7z -oextract
Everything is Ok
Use e only when you intentionally want every file in one flat directory. Files with the same name from different folders can collide, so x is safer for backups and source trees.
7z e project.7z -oflat
For ordinary ZIP-only work, the guide to unzip a directory in Linux covers common unzip patterns. For .tar.gz, .tgz, and .tar.xz files, see the Linux guide to open GZ and TGZ files.
Update or Delete Files Inside an Archive
The u subcommand adds new files and replaces changed files inside the archive. It does not delete stored files that disappeared from the source directory.
printf 'new\n' > project/newfile.txt
7z u project.7z project/newfile.txt
Use d to remove a stored path from the archive. This changes the archive only; it does not delete the source file from your working directory.
7z d project.7z project/cache.tmp
Encrypt Archive Names and Contents
Use -p without a password value so 7-Zip prompts securely instead of storing the password in shell history. Add -mhe=on to encrypt filenames as well as file contents.
7z a -p -mhe=on secure.7z project/config.txt
When filename encryption is enabled, listing or extracting the archive also requires the password. Keep that password somewhere recoverable because 7-Zip cannot restore it.
Test Archive Integrity
Test important archives after downloads, transfers, or backup jobs. This reads the archive and verifies stored checksums without extracting files.
7z t project.7z
Everything is Ok
If 7-Zip reports CRC errors, unexpected end-of-data messages, or a password error, get a fresh copy of the archive or retry with the correct password before extracting it.
Choose a Compression Level
The -mx switch controls compression effort from -mx0 to -mx9. Higher values can reduce size, but they also use more CPU and take longer on large archives.
| Switch | Behavior | Use Case |
|---|---|---|
-mx0 | Store files without compression | Already-compressed media or fast packing |
-mx1 | Fast compression | Large working archives where speed matters |
-mx5 | Default balanced compression | General backups and transfers |
-mx9 | Maximum compression effort | Smaller archives when runtime is acceptable |
7z a -mx9 maximum.7z project
7z a -mx1 fast.7z project
Create Split Archives
Use -v to split an archive into volumes for upload limits, FAT32 storage, or removable media. The example uses 100 MB pieces; common suffixes include k, m, and g.
7z a -v100m split-archive.7z project
7-Zip creates files such as split-archive.7z.001, split-archive.7z.002, and split-archive.7z.003. Keep every volume in the same directory when extracting, then point 7-Zip at the first volume.
7z x split-archive.7z.001
Exclude Logs and Build Output
Use -x to exclude files. Quote switches that contain ! so Bash does not treat the exclamation mark as history expansion in interactive shells.
7z a backup.7z project '-xr!*.log' '-xr!*.tmp'
The r modifier makes the exclusion recursive through subdirectories. Repeat the switch for each pattern you want to skip.
7z a backup.7z project '-xr!*.log' '-xr!*.tmp' '-xr!node_modules'
Remove the disposable practice workspace when you no longer need it:
rm -rf "$HOME/archive-demo"
Troubleshoot 7-Zip on Fedora Linux
Fix 7z or 7zz Command Not Found
A missing command usually means the wrong package is installed for the command name you are typing. Check package state and command paths first:
rpm -q 7zip 7zip-standalone-all
command -v 7z || true
command -v 7zz || true
Install 7zip when the missing command is 7z:
sudo dnf install 7zip
Install 7zip-standalone-all when the missing command is Fedora’s packaged 7zz:
sudo dnf install 7zip-standalone-all
If /usr/local/bin/7zz exists but the current shell still cannot find it, clear Bash’s command cache and check again:
hash -r
command -v 7zz
Fix Missing RAR or RAR5 Support
If 7z x archive.rar fails on Fedora’s packaged 7-Zip build, confirm whether your active binary lists RAR handlers:
7z i | grep -E 'Rar|Rar5'
No output means the active Fedora package does not expose those handlers. Use the official upstream 7zz method for RAR/RAR5 extraction through 7-Zip, or use the dedicated Fedora UnRAR package path when the task is only RAR extraction.
Fix Official Binary Architecture Errors
A wrong CPU build usually fails when you try to launch the binary:
7zz
bash: /usr/local/bin/7zz: cannot execute binary file: Exec format error
Check the machine architecture and reinstall using the matching official asset:
uname -m
x86_64
Systems showing x86_64 need the linux-x64 tarball. Systems showing aarch64 need linux-arm64. Remove the wrong manually installed binary before repeating the official download flow:
sudo rm -f /usr/local/bin/7zz
hash -r
Fix Corrupted Downloads or Checksum Failures
If tar reports a damaged archive or the update helper reports a checksum failure, delete the cached file and download it again. For the helper path, remove only the updater cache:
rm -rf "$HOME/.cache/7zip-official-updater"
update-7zip-official
For the manual download path, repeat the architecture and URL-resolution steps first if you opened a new terminal, then download the archive again.
Fix Permission Denied During Extraction
Permission errors usually mean you are extracting into a directory your user does not own. 7-Zip may print ERROR: Can not open output file and System ERROR: Permission denied when the output path is not writable.
Extract into a user-writable directory first. Use sudo only when the destination must be a protected system path:
mkdir -p "$HOME/extracted"
7z x archive.7z -o"$HOME/extracted"
Update or Remove 7-Zip on Fedora Linux
Update Fedora DNF Packages
Fedora-packaged 7-Zip variants update with normal DNF package maintenance:
sudo dnf upgrade --refresh
Update Official 7zz Binary
Use the helper when you installed the upstream binary under /usr/local/bin:
update-7zip-official
The helper checks the latest GitHub release, verifies the SHA-256 digest, and leaves the installed binary unchanged when the current version already matches upstream.
Remove Fedora DNF Packages
Remove only the Fedora packages you installed. The standard package removes the 7z command:
sudo dnf remove 7zip
Remove the optional Fedora 7zz package separately when you installed it:
sudo dnf remove 7zip-standalone-all
Verify package removal with RPM:
rpm -q 7zip 7zip-standalone-all
package 7zip is not installed package 7zip-standalone-all is not installed
Remove Official 7zz Binary and Helper
This cleanup removes the manually installed
7zzbinary, the update helper, the article-owned staging directory, cached updater files, and matching 7-Zip Linux tarballs under~/Downloads. Move any tarball you want to keep before running it.
For the manually installed upstream binary, remove the binary, updater, staging directory, downloaded tarballs, and updater cache:
sudo rm -f /usr/local/bin/7zz /usr/local/bin/update-7zip-official
rm -rf "$HOME/7zip-install" "$HOME/.cache/7zip-official-updater"
rm -f "$HOME"/Downloads/7z*-linux-*.tar.xz
Clear the shell cache, then check whether a manual 7zz command still resolves:
hash -r
command -v 7zz || echo "manual 7zz removed"
manual 7zz removed
If Fedora’s 7zip-standalone-all package is still installed, command -v 7zz may return /usr/bin/7zz after the manual binary is removed. Remove that DNF package too when you want the 7zz command gone completely.
Conclusion
7-Zip is ready on Fedora with either DNF-managed 7z, Fedora’s optional 7zz package, or the official upstream 7zz binary for the newer upstream build and RAR/RAR5 extraction. Keep the command name tied to the install source, and use Fedora’s UnRAR package when RAR extraction is the only archive task you need.


Formatting tips for your comment
You can use basic HTML to format your comment. Useful tags currently allowed in published comments:
<code>command</code>command<strong>bold</strong><em>italic</em><blockquote>quote</blockquote>