untar tar.gz ubuntu code example

Example 1: how to untar tar.gz

tar xvzf file.tar.gz

Example 2: extract tar.xz ubuntu

tar -xf file.tar.xz

Example 3: extract tar.gz ubuntu terminal

tar -xvf yourfile.tar.gz

Example 4: untar tar.gz

tar -xzf file.tar.gz

Example 5: 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 6: extract tar.gz

tar -xf archive.tar.gz