How to extract a tar.gz file [duplicate]

I am new to Ubuntu and I would like to know how I extract a tar.gz file. Thanks!


tar -xzf [filename]

will extract. To see the contents before extractring try tar -tvzf [filename]


You can use the graphical tools, file roller, or the command line.

file roller

See https://help.ubuntu.com/community/File%20Roller

Or the command line:

tar xzvf file.tar.gz

Right click on the tar.gz file and select the extract here option from the drop-down menu, and it will be extracted on the same folder as the compressed file.