This tutorial shows how to uncompress and install tar packages in ubuntu.

First,open up terminal(Applications/Accessories/Terminal).
For tar.gz packages:

sudo tar zxvf file.tar.gz

For tar.bz2 packages:

sudo tar jxvf file.tar.bz2

For rar packages

sudo rar a file.rar

For tar.Z packages

sudo uncompress file.tar.Z

If uncompress packages in user folder(/home/user),omit “sudo” in previous commands.
After uncompress a tar package,commonly you can read the “readme” file in folder for how to install.Following are often used:
option 1:

sudo ./configure
make install

option 2:

sudo ./configure --prefix=/path
make install

option 3:

sudo ./configure --enable-static-link \
--prefix=$XXX/static --with-curses &&
make &&
make install