Skip to main content

Quick Start Guide

This guide will get you up and running with 7-Zip quickly. You’ll learn the most common operations: creating archives, extracting files, listing contents, and testing archive integrity.
On Linux/macOS, use 7zz as the command. On Windows, use 7z (or 7z.exe with full path). The examples below use 7z for simplicity, but both work identically.

Basic Command Structure

7-Zip commands follow this pattern:
  • command - Single letter command (a, x, e, l, t, etc.)
  • switches - Optional parameters starting with -
  • archive_name - Name of the archive file
  • file_names - Files or directories to process

Creating Your First Archive

1

Create a simple archive

Compress a single file or directory into a 7z archive:
The a command means add to archive. If the archive doesn’t exist, 7-Zip creates it.
2

Set compression level

Control the compression ratio vs. speed tradeoff:
Compression levels:
  • -mx0 - Store only (no compression)
  • -mx1 - Fastest compression
  • -mx3 - Fast compression
  • -mx5 - Normal (default)
  • -mx7 - Maximum
  • -mx9 - Ultra (slowest, best compression)
3

Create a password-protected archive

Add encryption to protect sensitive data:
7-Zip will prompt you to enter a password. To specify the password inline:
7-Zip uses AES-256 encryption for 7z archives, which is considered very secure. Avoid using inline passwords in scripts as they may be visible in command history.
4

Create archives in other formats

Use the -t switch to specify the archive format:
Supported archive types for creation:
  • 7z - 7-Zip native format (default, best compression)
  • zip - ZIP archive
  • gzip - GZIP compressed
  • bzip2 - BZIP2 compressed
  • tar - TAR archive (no compression)
  • wim - Windows Imaging Format
  • xz - XZ compressed

Extracting Archives

1

Extract with full paths

Use the x command to extract files with their directory structure:
Note: There is no space between -o and the path. The correct syntax is -o/path/ not -o /path/.
2

Extract without paths

Use e to extract all files to a single directory (no subdirectories):
The e command extracts all files to the same folder, ignoring the original directory structure.
3

Extract password-protected archives

Provide the password when extracting encrypted archives:
4

Extract specific files

Extract only certain files from an archive:

Listing Archive Contents

Before extracting, you can view what’s inside an archive:
1

List files in archive

Use the l (list) command:
Output shows:
  • Date and time
  • File attributes
  • File size
  • Compressed size
  • File name
2

Show technical information

Get detailed technical information about the archive:
This displays:
  • Compression method
  • CRC checksums
  • Encryption details
  • Block information
  • Archive properties

Testing Archives

Verify archive integrity without extracting:
The t command checks:
  • CRC checksums
  • Archive structure
  • Compression integrity
  • File data validity
Always test archives after creation, especially for important backups, to ensure they weren’t corrupted during creation or transfer.

Common Use Cases

Backup a Directory

Split Large Archives into Volumes

This creates:
  • large_archive.7z.001
  • large_archive.7z.002
  • large_archive.7z.003
  • etc.
To extract, just use the first volume:

Update Existing Archive

Delete Files from Archive

Hash Calculation

Benchmark System Performance

Test your CPU’s compression and decompression speed:

Useful Switches Reference

Here are the most commonly used switches:

Command Quick Reference

Best Practices

  1. Use 7z format for best compression - The native 7z format provides better compression than ZIP
  2. Test archives after creation - Always use 7z t to verify integrity
  3. Choose appropriate compression levels - Use -mx1 for speed, -mx9 for size
  4. Use password protection for sensitive data - 7-Zip uses strong AES-256 encryption
  5. Enable multi-threading - Use -mmt to utilize all CPU cores for faster compression
  6. Split large archives - Use -v to create volumes that fit on media or have size limits

Next Steps

Command Reference

Explore all available commands and switches in detail

Advanced Usage

Learn advanced techniques like SFX archives, filtering, and automation

Format Specifications

Understand the 7z format and other supported archive types

Compression Methods

Deep dive into LZMA, LZMA2, PPMd, and other compression algorithms