← All commands
Topic hub File Management
Windows Linux File Management Archives & Compression

Windows 7z x equivalent in Linux

Extracts 7z, ZIP, RAR and many other archive formats while preserving directory paths.

Windows 7z x
Linux equivalents
Debian/Ubuntu same command
7z x archive.7z
Fedora same command
7z x archive.7z
Arch same command
7z x archive.7z

Overview

What this command does

Extracts 7z, ZIP, RAR and many other archive formats while preserving directory paths.

Migration tip: Use 7z l to list contents first. The x action preserves folder structure, while e extracts everything into one directory.

Practical tasks

Common use cases

Extract a 7-Zip archive

Extracts 7z, ZIP, RAR and many other archive formats while preserving directory paths.

7z x archive.7z

Extract with directory structure

7z x archive.7z -ooutput

Extract into output/

7z l archive.7z

List archive contents

Ready to run

Copyable Linux commands

Review paths, device names, package names and permissions before running any command.

7z x archive.7z
7z x archive.7z -ooutput
7z l archive.7z

Walkthrough

Examples with explanations

7z x archive.7z # extract an archive
7z x archive.7z -ooutput # extract into output/
7z l archive.7z # preview archive contents

Reference

Common options and variations

Command or optionUse
7z x archive.7zExtract with directory structure
7z x archive.7z -ooutputExtract into output/
7z l archive.7zList archive contents

Distro differences

Debian/Ubuntu vs Fedora vs Arch

This command is the same on Debian/Ubuntu, Fedora and Arch Linux when the relevant tool is installed.

DistributionPackage manager / baseEquivalent commandDifference to notice
Debian/Ubuntu same command 7z x archive.7z Same command on this distribution.
Fedora same command 7z x archive.7z Same command on this distribution.
Arch same command 7z x archive.7z Same command on this distribution.

Keep learning

Related File Management commands