command line tar.gz extract code example Example 1: tar.gz terminal tar -xzvf archive.tar.gz Example 2: extract tar gz tar xvzf file.tar.gz