Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-01-2008, 05:42 PM   #1
LQ Newbie
Registered: Apr 2008
Posts: 2

Rep: Reputation: 0
how to i install tar.bz2?

today is the first day ive ever used linux, im using ubuntu. installing things is a bit confusing for me, i need help. thanks
Old 04-01-2008, 05:57 PM   #2
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,396

Rep: Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395
tar -xvfj yourfile.tar.bz2

FYI, bz2 mean the bzip2 compression method was used . See
man bzip2

If gzip had been used, the filename would look like
file.tar.gz or file.tgz
and the extract cmd
tar -zxvf file.tar.gz
tar -zxvf file.tgz

man tar
man gzip

you do need to be in the dir where the file exists and own it to extract it. It should create a dir under there with the extracted contents.

You'll find these useful:

Last edited by chrism01; 04-01-2008 at 05:58 PM.
Old 04-01-2008, 06:00 PM   #3
Senior Member
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
to break it down:


file is the file name - doesn't tell us much
tar - this is a tar archive ("man tar" in a terminal window for more info)
bz2 - this file uses bzip2 compression (kinda like a zip file in windows or a stuffit file on a mac)

fyi: the shorthand version of this same file would be file.tbz2. That said, the extension doesn't matter with most linux apps, so it could just as easily be file.bkRulz & all the following would still apply.

to unarchive/uncompress this file, open a terminal window & do the following (in a terminal):

bunzip2 file.tar.bz2

this will uncompress the bzip2 & leave you with a tar archive called "file.tar"

to unarchive the tar, in the terminal:

tar xvf file.tar

-- or --

you can do it all at once by telling tar this is a bzip2 archive, like so:

tar xvjpf file.tar.bz2

for more info, read "man tar".

if you're unsure of any file, in a terminal, type

file whatever_file.ext

and you can see what type of file you're dealing with.

edit: I knew someone would be me to the answer, but after all this typing, I'm leaving it here.

Last edited by BrianK; 04-01-2008 at 06:03 PM.
Old 04-01-2008, 06:12 PM   #4
Registered: Jan 2006
Distribution: Gentoo
Posts: 494

Rep: Reputation: 35
Hello, and welcome!
First of all. You must know, that there are several methods to install software under linux.
Method #1: use the package manager. There are several package managers, but let's stick with Synaptic.
Method #2: using a tarball (tar.bz2 or tar.gz). Only use this method, if you couldn't find the software you need with the package manager, or you just need a newer version or you want to experiment. This method takes more time and it is unnecessary to install anything this way, if there is already a binary package available (.deb).
To answer the question in the title:
#1.: unpack the tarball
#2.: search for the text file "INSTALL" or "README" in the unpacked folder
#3.: read instructions
#4.: do what instructions say

To be more specific, the following commands are needed to install a tarball (install package from source).
make install

This works almost every time, but you may encounter some packages, where this method doesn't work. In this case follow steps #1 to #4 listed above.
You must also know, that it is strongly advisable to type
./configure --help
before ./configure because this way you will be able to see all the possible fine-tune options for that particular package.
Good luck!

P.S.: next time please use the search function of the forums before asking a question, since this question already was discussed several times before. Thanks.

Last edited by pusrob; 04-01-2008 at 06:14 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why can't I install a *.tar.gz or a *.tar.bz2 file? SkinnerC Slackware 11 12-13-2007 10:03 AM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
can not install the tar(gz,bz2) packages tuzhiyong Linux - General 2 11-23-2004 05:23 PM
how to install tar.bz2? Fear58 Linux - Software 1 06-20-2004 07:20 PM
How to install .tar.bz2? daYz Slackware 10 11-14-2003 01:58 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:28 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration