tar extract gz linux code example Example 1: extract tar.gz linux command line tar xvzf file.tar.gz Example 2: extract a tar.xz in linux tar -xvf archive.tar.xz