how to unzip tar.gz file to a directory in linux code example Example 1: unzip tar.gz tar -xvf file.tar.gz Example 2: linux unpack tar.gz file tar -zxvf file_name.tar.gz