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

Windows 7z a equivalent in Linux

Creates 7z, ZIP and other supported archive formats with the 7-Zip command-line tool.

Windows 7z a
→
Linux equivalents
Debian/Ubuntu same command
7z a archive.7z folder/
Fedora same command
7z a archive.7z folder/
Arch same command
7z a archive.7z folder/

Overview

What this command does

On Windows, "7z a" is used to create a 7-Zip archive. On Linux, the closest practical mapping shown here is "7z a archive.7z folder/". Creates 7z, ZIP and other supported archive formats with the 7-Zip command-line tool. This reference is grouped under File Management → Archives & Compression.

Migration tip: The Linux package may be named <code>7zip</code>, <code>p7zip</code> or <code>p7zip-full</code>, depending on the distribution.

Windows → Linux context

What changes when you use this on Linux?

Same name, different environment

The basic command name 7z is familiar on both platforms, but Linux path rules, quoting, permissions and available options can still change the result.

Portable across the compared distros

The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.

Practical tasks

Common use cases

Create a 7-Zip archive

Creates 7z, ZIP and other supported archive formats with the 7-Zip command-line tool.

7z a archive.7z folder/

Create a 7z archive

7z a archive.zip folder/

Create a ZIP archive

7z a -mx=9 archive.7z folder/

Use maximum compression

Ready to run

Copyable Linux commands

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

7z a archive.7z folder/
7z a archive.zip folder/
7z a -mx=9 archive.7z folder/

Walkthrough

Examples with explanations

7z a archive.7z folder/ # create a 7z archive
7z a archive.zip folder/ # create a ZIP archive
7z a -mx=9 archive.7z folder/ # use maximum compression

Reference

Common options and variations

Command or optionUse
7z a archive.7z folder/Create a 7z archive
7z a archive.zip folder/Create a ZIP archive
7z a -mx=9 archive.7z folder/Use maximum compression

Distro differences

Debian/Ubuntu vs Fedora vs Arch

Debian/Ubuntu, Fedora and Arch all use "7z a archive.7z folder/" for this mapping. The command syntax shown here is portable across the three rows, although installed versions and system defaults can still vary.

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

Keep learning

Related File Management commands