how to extract tar.gz files in ubuntu code example Example 1: untar .tar file tar -xvf yourfile.tar Example 2: extract tar gz tar xvzf file.tar.gz