how to install tar.gz file in ubuntu code example

Example 1: extract tar.xz ubuntu

tar -xf file.tar.xz

Example 2: how to install tar.gz in ubuntu

Download the desired .tar.gz or (.tar.bz2) file
Open Terminal
Extract the .tar.gz or (.tar.bz2) file with the following commands
tar xvzf PACKAGENAME.tar.gz
tar xvjf PACKAGENAME.tar.bz2
Navigate to the extracted folder using cd command
cd PACKAGENAME
Now run the following command to install the tarball
./configure
make
sudo make install

Example 3: install from tar gz file unix

tar -xzvf filename.tar.gz

Example 4: install tar.bz2 file

#Extract the file tar.bz2
 tar -xjvf file.tar.bz2
#Compile and install
 cd file
 ./configure
 make
 sudo make install

Example 5: how to install tar.gz in ubuntu

tar -xzf archive-name.tar.gz
cd archive-name
./configure
make
sudo make install

Example 6: install tar.xz in ubuntu

tar xf [filename]

This will expand the contents of the file to a folder. Then the commands are, from the folder:

./configure

make

sudo make install