Skip to content

Arch Linux Compression Tools

Mattscreative edited this page Dec 5, 2025 · 2 revisions

Arch Linux Compression Tools Guide

Complete beginner-friendly guide to compression tools on Arch Linux, including tar, zip, 7z, and compression utilities.


Table of Contents

  1. tar
  2. zip/unzip
  3. 7-Zip
  4. Other Compression Tools
  5. Troubleshooting

tar

Create Archive

Create tar:

# Create tar
tar -cf archive.tar files/

# Create compressed tar
tar -czf archive.tar.gz files/

# Create bzip2
tar -cjf archive.tar.bz2 files/

# Create xz
tar -cJf archive.tar.xz files/

Extract Archive

Extract tar:

# Extract
tar -xf archive.tar

# Extract to directory
tar -xf archive.tar -C /path/to/directory

# List contents
tar -tf archive.tar

zip/unzip

Create Zip

Create zip:

# Install zip
sudo pacman -S zip

# Create zip
zip archive.zip files/

# Recursive
zip -r archive.zip directory/

Extract Zip

Extract zip:

# Install unzip
sudo pacman -S unzip

# Extract
unzip archive.zip

# Extract to directory
unzip archive.zip -d /path/to/directory

7-Zip

Install 7-Zip

Install 7z:

# Install 7-Zip
sudo pacman -S p7zip

# Create archive
7z a archive.7z files/

# Extract
7z x archive.7z

Other Compression Tools

gzip

Use gzip:

# Compress
gzip file.txt

# Decompress
gunzip file.txt.gz

bzip2

Use bzip2:

# Compress
bzip2 file.txt

# Decompress
bunzip2 file.txt.bz2

xz

Use xz:

# Compress
xz file.txt

# Decompress
unxz file.txt.xz

Troubleshooting

Archive Corrupted

Check archive:

# Test tar
tar -tf archive.tar

# Test zip
unzip -t archive.zip

Permission Issues

Fix permissions:

# Extract with permissions
tar -xpf archive.tar

Summary

This guide covered tar, zip, 7-Zip, and other compression tools.


Next Steps


This guide is based on the ArchWiki. For the most up-to-date information, always refer to the official ArchWiki.

Clone this wiki locally