What command compresses files using bzip2?

The story behind the answer

The command that compresses files using bzip2 is `bzip2`.

bzip2 is a free, open-source compression program created by Julian Seward and first released in 1996. It uses the Burrows–Wheeler transform followed by Huffman coding, producing files that usually end in `.bz2`. For example, `bzip2 report.txt` compresses the file to `report.txt.bz2`, while `bzip2 -d report.txt.bz2` decompresses it.

A common mix-up is confusing bzip2 with the archive utilities often used alongside it. bzip2 compresses individual files; `tar` bundles multiple files into one archive. That is why software distributions frequently use `.tar.bz2`: tar creates the archive and bzip2 compresses it. The alternatives shown are also real compression commands, but they use different formats: `gzip` creates `.gz`, `xz` creates `.xz`, and `zip` commonly combines archiving and compression.

Source: Wikipedia · fact-checked Aug. 2026

Add question to a list

Choose a list to keep this question in: