To extract a tar.bz2 file, use the command :
tar -jxvf filename.tar.bz2
To extract a tar.gz file, the the command :
tar -zxvf filename.tar.gz
To extract a tar.bz2 file, use the command :
tar -jxvf filename.tar.bz2
To extract a tar.gz file, the the command :
tar -zxvf filename.tar.gz