uncompress tar.gz linux code example

Example 1: how to untar tar.gz

tar xvzf file.tar.gz

Example 2: extract tar.gz ubuntu terminal

tar -xvf yourfile.tar.gz

Example 3: linux unpack tar.gz file

tar -zxvf file_name.tar.gz

Example 4: extract tar.gz linux command line

tar xvzf file.tar.gz

Example 5: how to extract tar.gz

If your tar file is compressed using a gzip compressor, use the following command to extract it.

    $ tar xvzf file.tar.gz
    
If your tar file is compressed using a bZip2 compressor, use the following command to extract it.

    $ tar xvjf file.tar.bz2