extract tar file command linux ubuntu code example Example 1: linux extract tgz tar zxvf file.tgz Example 2: extract tar.gz ubuntu terminal tar -xvf yourfile.tar.gz