extract tar.gz in terminal code example Example 1: extract tar.gz mac command line tar -xzvf myfile.tar.gz Example 2: extract tar.gz tar -xf archive.tar.gz