← All operating systems

How to open archives on Linux (Ubuntu, Fedora, Arch, etc.)

A complete guide to extracting and creating ZIP, RAR, 7z, TAR and other archive formats on Linux (Ubuntu, Fedora, Arch, etc.).

Overview

Linux is the natural home of the tarball. Every distribution ships tar, gzip, bzip2, xz, and usually zstd. RAR and 7z require optional packages but are one apt-get / dnf away. Most desktop environments include a graphical archive manager (file-roller on GNOME, ark on KDE) that wraps the command-line tools.

What Linux (Ubuntu, Fedora, Arch, etc.) handles out of the box

  • tar, gzip, bzip2, xz on every distribution
  • zstd on most distributions since 2020
  • file-roller (GNOME Files) or ark (KDE Dolphin) GUI

Recommended archivers for Linux (Ubuntu, Fedora, Arch, etc.)

  • p7zip-full or 7zip — for 7z and ZIP
  • unrar (non-free repo) or unrar-free — for RAR
  • PeaZip — Linux GUI with 200+ format support
  • dar / borg / restic — for serious backups

How to extract any archive

  1. Right-click the archive in your file manager
  2. Choose Extract Here, or Extract To... to pick a folder
  3. On the command line: tar -xf archive.tar.xz (auto-detects compression on modern tar)
  4. 7-Zip: 7z x archive.7z

How to create an archive

  1. Select files in your file manager
  2. Right-click → Compress... and pick a format
  3. On the command line: tar -caf archive.tar.zst folder/ (-c create, -a auto compression by extension, -f file)
  4. 7-Zip: 7z a archive.7z folder/

Pro tips

Use --xattrs --acls when creating tarballs of system files to preserve extended attributes and ACLs.
For huge backups use Borg or restic — both deduplicate so daily snapshots cost almost nothing in disk space.
Modern tar auto-detects compression on extract, so you do not need -z, -j, -J flags anymore.

Common formats on Linux (Ubuntu, Fedora, Arch, etc.)

The formats most people encounter on Linux (Ubuntu, Fedora, Arch, etc.):

Other operating systems