Updated: 11 October 2026 · Applies to: AlmaLinux 9, Rocky Linux 9, Ubuntu 24.04 and Debian 12

Create and unpack archives with tar, zip and compression tools.

tar czf archive.tar.gz dir       # create (gzip)
tar cJf archive.tar.xz dir       # create (xz, smaller)
tar tzf archive.tar.gz           # list contents
tar xzf archive.tar.gz           # extract
tar xzf archive.tar.gz -C /dest  # extract to a folder
zip -r archive.zip dir           # create a zip
unzip archive.zip                # extract a zip
gzip file / gunzip file.gz       # compress / decompress one file

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket