At some point in your life, you'll have to download free or paid software from a website to install on your computer. Unlike regular files, most software can't use the standard compressions formats as that would compromise the integrity of the files. Most software uses the tar.gz format to deliver large files in single, convenient package. Let's talk about how to extract tar.gz file so you can access the contents.

What is a TAR.GZ file?

A tar.gz file is a tar archive that's compressed with GNU zip.

A tar archive or a tarfile contains a group of files bundled together into a single file using the tar command. It uses the file extension .tar.

Tar stands for Tape Archive, a UNIX command used to create archives for storing files on magnetic tapes. The command converts a group of files into an archive.

Gzip is a compression program used to compress tar files giving them the double file extension -.tar.gz.

The tarfile serves as a portable container (archive) for the files, while the .gz extension represents the compression utility. Hence, a tar.gz is simply a .tar archive compressed with gzip technology.

Tarfiles are a convenient way to store and distribute multiple files, and most of them come as programs, package files, or installers. These file types are common in Unix-based operating systems and less common in Windows and macOS environment.

How to extract a TAR.GZ file

If you tried to open a .tar.gz file directly, most computers won't probably recognize the double file extension. That's because you need to decompress then extract the files from the tar archive, and you need a tar command for that. There are three main ways of extracting files from a compressed tar archive.

Use TAR utility

Most Linux and macOS systems have a pre-installed tar command; hence you may not need to install a specialty solution such as WinZip to extract the files. The command $ tar -xf archive.tar.gz. extracts a tar archive in Linux and macOS computers. Option (-x) is the command, while option (f) specifies the archive's name.

The tar command automatically detects the compression type and extracts the archive. By default, tar extracts the files in a .tar.gz file in the current working directory. But you can use the directory command -C to specify the directory - $ tar -xf archive.tar.gz -C /home/directory/files.

Include the (-v) option if you wish to print the names of the files on the Terminal and make the tar command more visible - $ tar -xvf archive.tar.gz.

Use the terminal app

MacOS users can use the terminal app to extract files from a compressed tar archive using the Terminal App. The Terminal app is found in the Utilities Folder. Double click the Terminal to launch the app.

Enter the tar command tar -xf file.tar.gz in the Terminal and press Return to run the command. The newly unpacked files will be stored in the current file directory.

Use a specialty solution

While command lines are an effective way to extract compressed tar archives, they can be quite unforgiving. Luckily, there are other solutions like WinZip that offer you better options. They let you extract your files from a compressed tar archive without requiring you to remember  a single command.

External programs such as WinZip simplifies the process of opening tar.gz files. The application extracts the tar archive and can unzip the files in the archives for easy access. To easily extract gz file in Windows, simply associate the file suffix .tar.gz with an application such as WinZip. That lets you extract a compressed tar archive by double-clicking on it.

Conclusion

Extracting tar.gz files with WinZip is quicker and more efficient than using a tar utility or the Terminal App. This technology reduces the extraction process to a few clicks, eliminating the need to memorize commands.

Need to Download WinZip?

TRY NOW Learn More