nerdexam
LPI

010-100 · Question #21

What is the correct command to extract the contents of the archive file download.bz2?

The correct answer is C. bunzip2 download.bz2. The bunzip2 command is the correct tool for decompressing .bz2 files on Linux/Unix systems.

The Power of the Command Line

Question

What is the correct command to extract the contents of the archive file download.bz2?

Options

  • Aunpack download.bz2
  • Bunzip2 download.bz2
  • Cbunzip2 download.bz2
  • Dunzip download.bz2
  • Euncompress download.bz2

How the community answered

(44 responses)
  • A
    2% (1)
  • B
    5% (2)
  • C
    75% (33)
  • D
    7% (3)
  • E
    11% (5)

Why each option

The bunzip2 command is the correct tool for decompressing .bz2 files on Linux/Unix systems.

Aunpack download.bz2

unpack is not a standard Linux command for decompressing bzip2 archives.

Bunzip2 download.bz2

unzip2 does not exist as a standard Linux utility; the correct counterpart to bzip2 is bunzip2.

Cbunzip2 download.bz2Correct

bunzip2 is the standard decompression utility for bzip2-compressed files (.bz2). It reads the compressed archive and extracts the original file contents in place, removing the .bz2 extension from the output file.

Dunzip download.bz2

unzip is used for .zip format archives, not .bz2 bzip2-compressed files.

Euncompress download.bz2

uncompress is used to decompress .Z files created by the compress command, not .bz2 files.

Concept tested: bzip2 decompression command on Linux

Source: https://linux.die.net/man/1/bunzip2

Topics

#bunzip2#bzip2 compression#file extraction#archive tools

Community Discussion

8
Yusuf A.Yusuf A.May 25, 2026

The answer is C, bunzip2 download.bz2. My senior showed me early on that the bz2 format has its own dedicated tool called bunzip2, which is the counterpart to bzip2 the same way gunzip is the counterpart to gzip. Option D trips up a lot of people because unzip is a real command, but it handles ZIP files not bz2 files, so it would just throw an error here. Options A and B are not real Linux commands at all, and uncompress in option E is for the older .Z compress format, not bz2. Once you start thinking about compression tools in matched pairs like that it gets a lot easier to keep them straight.

26
Dervla O.Dervla O.May 26, 2026

The matched-pairs framing is solid, and one more layer worth adding is that bunzip2 and bzip2 -d are interchangeable, so if you see a question stem that swaps in the flag form, the logic holds the same way.

0
Dervla O.Dervla O.May 14, 2026

The stem says "extract the contents," which nudges people toward D because unzip feels like the natural extraction verb, but unzip only handles ZIP archives, not bz2. bunzip2 is the right tool for bz2 files, so C is your answer.

1
Bao N.Bao N.Jun 21, 2026

C is the one to know here, bunzip2 is the native tool for .bz2 files the same way gunzip handles .gz and unxz handles .xz. Do you also know what flag you would pass to tar if you wanted to extract a .tar.bz2 in a single command without running bunzip2 separately first?

1
Thiago A.Thiago A.Jun 6, 2026

bunzip2 is the one, D and E are for zip and compress formats.

-2
Bao N.Bao N.Jun 8, 2026

Thiago nailed it, though worth adding that bunzip2 is for bzip2-compressed files specifically, so if someone hands you a plain .gz you still need gunzip or gzip -d, which trips people up on the format-recognition questions.

0
Ola B.Ola B.Jun 26, 2026

Going with E on this one, uncompress is the utility that handles decompression on Linux systems and it covers the bz2 format as part of that general-purpose role. I actually spun up a quick sandbox last week drilling these exact compression commands and uncompress handled the job without me needing to remember which specific tool matched which extension. The other options are either made-up commands or tools tied to different formats, like unzip is for zip files and that D option would not even run on a bz2 archive. Trust the general-purpose decompression tool here, that is what it exists for.

-2
Yusuf A.Yusuf A.Jun 29, 2026

Ola, I think you might be mixing that one up, uncompress is actually paired with the compress utility and only handles .Z files, not .bz2. The right tool for bz2 archives is bunzip2, which is option C.

0
Full 010-100 Practice