command to open .tar.gz file in linux code example Example 1: extract tar.gz ubuntu terminal tar -xvf yourfile.tar.gz Example 2: tar.gz terminal tar -xzvf archive.tar.gz