-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux Compression Tools
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to compression tools on Linux, covering Arch Linux, CachyOS, and other distributions including tar, zip, 7z, and compression utilities.
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 tar:
# Extract
tar -xf archive.tar
# Extract to directory
tar -xf archive.tar -C /path/to/directory
# List contents
tar -tf archive.tarCreate zip:
# Install zip
sudo pacman -S zip
# Create zip
zip archive.zip files/
# Recursive
zip -r archive.zip directory/Extract zip:
# Install unzip
sudo pacman -S unzip
# Extract
unzip archive.zip
# Extract to directory
unzip archive.zip -d /path/to/directoryInstall 7-Zip:
# Arch/CachyOS
sudo pacman -S p7zip
# Debian/Ubuntu
sudo apt install p7zip-full
# Fedora
sudo dnf install p7zipCreate archive:
# Create archive
7z a archive.7z files/
# Extract
7z x archive.7zUse gzip:
# Compress
gzip file.txt
# Decompress
gunzip file.txt.gzUse bzip2:
# Compress
bzip2 file.txt
# Decompress
bunzip2 file.txt.bz2Check archive:
# Test archive
tar -tf archive.tar
# Check zip
unzip -t archive.zipThis guide covered compression tools for Arch Linux, CachyOS, and other distributions, including tar, zip, 7z, and other utilities.
- Backup and Restore - Backups
- File Managers - File management
- ArchWiki Compression: https://wiki.archlinux.org/title/Compression
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.