Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a file as: filename.bz2, but I can't figure out how to decompress it. I tried several methods, none of them seems work.

I have tried the command: tar xvjf filename.tar.bz2, but it didn't work as the file is not a tar file. Would anyone know how to decompress this file?

share|improve this question

migrated from stackoverflow.com Sep 28 '12 at 19:42

This question came from our site for professional and enthusiast programmers.

4 Answers 4

up vote 115 down vote accepted

Try the following:

bzip2 -d filename.bz2

Note, that this command will not preserve original archive file.

share|improve this answer
bzip2 -dk filename.bz2 keep original file. –  Trindaz Sep 18 '14 at 18:28

Just to explain a bit further, a single file can be compressed with bzip2 thus:

bzip2 myfile.txt

tar is only required when compressing multiple files:

tar cvjf myfile.tar.bz *.txt

Hence, when uncompressing a .bz2 file use bunzip, when uncpresssing a tar.bz2 file use tar xjvf.

share|improve this answer
Excellent advice about the xjvf, just saved me. Thanks! –  Edgar Aroutiounian Aug 17 '13 at 3:22
You can just use tar xjf filename.tar.bz2. The v just adds verbose output. Keep your terminal clean! I also had problems running tar -xjf, so be sure to try running it sans the - –  MrOodles Jan 15 at 15:14

Use the bunzip2 (or bzip2 -d) command to decompress the file. For more information see this man page,

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.