A file with the file extension TGZ or GZ is created using the tar of the Unix-based archiving application and then compressed using GZIP compression. These files consist of a collection of files that have been placed in a TAR file primarily for easy storage and tracking. TAR files are often compressed once created; compressed TAR files are called tarballs and sometimes use a “double” extension like “.TAR.GZ”, but are generally shortened to “.TGZ” or “.GZ”.
How to extract .TAR.GZ, .TGZ or .GZ. archive
.TAR.GZ, .TGZ or .GZ. files are usually viewed with software installers on Unix-based operating systems like Ubuntu and macOS for data archiving and backups. But sometimes they are used for regular data archiving purposes, therefore Windows 10 users may also come across these files and may need to extract their contents.
Extract a .TAR.GZ, .TGZ or .GZ. The file is simple. They can be extracted using third-party applications like 7-Zip and PeaZip, which are free and open source. In addition to external applications, Windows 10 includes native TAR support that can help you extract TAR files using simple command prompts. Today we discuss some of these methods:
1] Use of third-party software
You can use third-party software to extract compressed files.
a] Open TGZ files with 7-Zip
7-Zip is a free open source archive with a high compression rate. This software can be used on any computer, including those of a commercial organization. This utility can help you extract compressed files and create your own compressed files in several different formats. To extract TAR files using 7-Zip, follow the steps below:
- Open the 7-Zip website and download the 32-bit or 64-bit version 7-Zip depending on your system type.
- Note: To check the type of system, open “Settings”, go to “System” and click on “About”.
- Once downloaded, open the 7-Zip installer to install the software on your Windows system.
- Then open the 7-Zip application from the search menu.
- Now, inside the 7-Zip file explorer, go to the folder that contains your TGZ file.
- Now select and right-click on the TGZ file, press 7-zip and press the extraction files to open the extraction window as shown below.
- You will see that a new folder path is already included in the “Extract to” text box. But if you wish, you can modify this itinerary if necessary.
- Press ‘OK’ to extract the TGZ file.
- Now double-click on the extracted TAR folder in the same 7-Zip window to open it.
Once you have opened the initial file, double-click on the TAR sub-files / folders to open and view the content.
b] Convert TGZ files to ZIP format using the online TGZ converter
Windows 10 File Explorer allows users to extract ZIP files. Inherently, you can open the contents of a TGZ file by first converting it to ZIP format. Once the files are converted, users can use the “Extract All” option to decompress the ZIP. You can convert TGZ files to ZIP format using online converters, here’s how:
- Open the Convertio web tool in your web browser. It is an online TGZ converter (TAR.GZ) that can convert files to and from tgz on the web.
- Now select “Choose files” to select a TGZ file to convert to ZIP.
- Select the file in the folder and click “Open” to add the file to the online converter.
- Select the type of conversion to “Zip”
- Now press the “Convert” button to convert the file.
- Click “Download” and save the new ZIP file.
- Go to the downloaded files folder and double-click the downloaded ZIP file to open its Extract tab. Now press the “Extract All” button to open the window directly below.
- Select the destination and press Extract.
- Now double-click on the extracted ZIP folder and open its contents.
2] Using native tar commands in Windows 10
Windows 10 has native tar support that you can use with the command prompt to extract these files. In addition to this, users can use the Windows for Linux Subsystem (WSL) which provides native support for Ubuntu, Fedora, and SUSE, and thus can also access many Linux tools, including tar, to instantly extract the content of tarballs. Here we discuss the steps for using native tar commands in Windows 10 using the command prompt and Ubuntu to extract the contents of a .tar.gz file.
a] Extract tarballs .tar.gz, .tgz or .gz using tar in Windows 10
To extract .tar.gz, .tgz or .gz files using tar in Windows 10, do the following:
- Open the “Start” menu.
- Search for “Command Prompt”
- Right-click on the first result and press “Run as administrator”
- Now type the following command to use tar to extract the files and press “Enter”:
tar -xvzf C:\PATH\TO\FILE\FILE-NAME.tar.gz -C C:\PATH\TO\FOLDER\EXTRACTION
Be sure to update the syntax to include the source and destination paths.
Once the above steps are completed, all files and folders will be extracted to the specified destination.
b] Extract tarballs .tar.gz, .tgz or .gz using tar on Linux on Windows 10
Another way to use tar in Windows 10 is to install Ubuntu on your system. Once installed on your Windows 10 system, follow the steps below:
- Start “Ubuntu” from the “Start” menu
- Now type the following command to extract the contents of the .tar.gz file:
sudo tar -xvzf /mnt/c/PATH/TO/TAR-FILE/Desktop/FILE-NAME.tar.gz -C /mnt/c/PATH/TO/DESTINATION/FOLDER
- Be sure to update the syntax to include the source and destination paths.
- Now press the “Enter” key.
Now you will have all the files and folders extracted to the specified destination.
You can now extract .TAR.GZ, .TGZ or .GZ. Windows 10