What command do I need to unzip/extract a .tar.gz file?

This command should do the trick:

tar -xvzf VMware_Tools.tar.gz

To explain a little bit, tar collected all the files into one package. VMware_Tools.tar.
The gzip program is responsible for compression, hence the gz extension.

  • f: this must be the last flag of the command, and the tar file must be immediately after. It tells tar the name and path of the compressed file.
  • z: tells tar to decompress the archive using gzip
  • x: extract them
  • v: Verbose output shows you all the files being extracted.

2 thoughts on “What command do I need to unzip/extract a .tar.gz file?”

Leave a Reply to Gregorio Cancel reply

Your email address will not be published. Required fields are marked *