how to extract a tar.gz ubuntu code example Example 1: untar .tar file tar -xvf yourfile.tar Example 2: extract tar.gz tar -xf archive.tar.gz