Windows 11 includes native support to extract “.tar.gz” files using Command Prompt without needing third-party tools. You can even use a Linux distro through the Windows Subsystem for Linux (WSL) to quickly extract tarballs created on another platform.
When you see a .tar.gz file, it means that this is a file created using the Unix-based archival application tar and then compressed using gzip compression. These files are often referred to as “tarballs.” While you can find them written like a double extension (.tar.gz), the format can also be written as .tgz or .gz. (It is worth noting that Linux doesn’t use file extensions. Instead, the file type is part of the file name.)
Although tar files are usually more common on Linux distros (for example, Ubuntu) and macOS for backups and archival, you may also come across these files on Windows 11. You could use third-party tools like 7-Zip and PeaZip, but these are not recommended as they don’t always work to extra .tar.gz files. Instead, you should be using the native tar support available on Windows 11 or a Linux distro in WSL.
In this guide, you will learn the steps to use native tar commands on Windows 11 using Command Prompt and Ubuntu to extract the content of a .tar.gz file.
- Extract .tar.gz, .tgz, .gz tarballs on Windows 11 using tar
- Extract .tar.gz, .tgz, .gz tarballs on Windows 11 using Linux tar
To extract .tar.gz, .tgz, .gz, and .zip files using tar on Windows 11, use these steps:
-
Open Start on Windows 11.
-
Search for Command Prompt, right-click the top result, and select the Run as administrator option.
-
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
In the command, change the command to include the source and destination paths.
Once you complete the steps, the files and folders will extract to the specified destination.
It is assumed the tarball was created on another system. Also, we skipped some options that are usually useful to preserve permissions since they are not required on Windows 11.
You first have to install a distro using the Windows Subsystem for Linux before you can extract tarballs on Linux.
To extract a .tar.gz file using Linux, use these steps:
-
Open Start.
-
Search for Ubuntu and click the top result to open the app.
-
Type the following command to extract the content of the .tar.gz file and press Enter:
sudo tar -xvzf /mnt/c/PATH/TO/TAR-FILE/Desktop/FILE-NAME.tar.gz -C /mnt/c/PATH/TO/DESTINATION/FOLDER
In the command, change the syntax to include the source and destination paths. If it’s only a .tar file, use the same command but omit the z argument.
We used the sudo
command to run the tool as an administrator, tar
to call the application, and we use these options:
- x — instructs tar you want to extract content.
- v — optional argument to display the extraction process. Otherwise, you will only see a blinking cursor until the process is complete.
- z — tells tar to uncompress the content of a “.tar.gz” file with gzip.
- f — instructs tarball the name of the file to extract.
After the option, you have to specify the path of the tarball file to extract. In the command, we start the path with /mnt/c/
since this is Linux, not Windows.
The -C — (hyphen and capital C) option is used to change folders, and you have to specify the destination path, which starts with the /mnt/
annotation followed by the Windows path.
You must pay attention to uppercase and lowercase while typing a Linux command since “Desktop” is not the same as “desktop.”
These are the basic options to extract a “.tar.gz” file, but you can use the tar --help
command to learn more about the available options.
It’s important to note that Microsoft is building native support for TAR, GZ, 7-Zip, RAR, and many other archival formats to File Explorer. The support is expected to arrive with the release of Windows 11 23H2.
Tar files are a collection of files wrapped up into a single file. Tar.gz files use the standard gnu zip(gzip) compression. Due to their portability, you don’t need any extra software to unbundle them in Linux/macOS.
Because of this, the source code of open-source software is generally packaged as tar.gz files. Using system-provided package managers is an easier way for installation. But, not all software is available across all Linux systems. Also, the type of licensing may prevent some applications from being available altogether. This is where the tar.gz build system comes in.
How to Install Tar.gz
How to Extract Tar.gz Files
You can decompress a tarball in one of two ways. Most Ubuntu-based distros come with the Archive Manager application. Use either one of these approaches as you see fit.
Extract Tar.gz Files Using Archive Manager (Ubuntu/kali Linux/ Mint/ Debian)
- Use your File Manager to get to the location of the file.
- Right Click on the file and click on Extract Here. You should see the Archive Manager extraction progress.
- After completion, you will notice a new folder created along with the tar.gz files.
- Open this folder in the terminal.
Extract Tar.gz Using the Command Line (All Linux Flavours + Macos Any Version)
- Open the terminal.
- cd /home/foo/Downloads
- Takes you inside the downloaded location.
- ls *tar.gz*
- Finds any tar.gz files and displays the full filename.
- tar -xzf keepassx-2.0.3.tar.gz
- Extracts from the tarball keepassx-2.0.3.tar.gz and creates a new folder with the same name.
- Extracts (x) using the Gzip algorithm (z) of the file (f) named ‘keepassx-2.0.3.tar.gz’.
- cd keepassx-2.0.3
- Takes you inside the now extracted folder.
- ls
- To confirm if the extraction completed successfully and to Check if you have a
configure.ac
file orCmakelists.txt
file in this folder.
- To confirm if the extraction completed successfully and to Check if you have a
How to Extract Tarfile in Windows
If you are using Windows 10 or newer, you can use tar utility from Powershell. If using an older version, you need to install extraction software to get files from tar.gz. This article lists some of the popular software used in Windows PC.
- Type Powershell in Start Menu to open Windows Powershell.
- tar -xzf keepassx-2.0.3.tar.gz
- Extracts (x) while being verbose (v) using the gzip algorithm (z) of the file (f) named ‘keepassx-2.0.3.tar.gz’.
- Extracts (x) while being verbose (v) using the gzip algorithm (z) of the file (f) named ‘keepassx-2.0.3.tar.gz’.
How to Install Tar.gz File
For our purposes, we will examine the steps by installing a free application. The name of this application is KeePassX. Check their website for more information.
After following the above steps, we have the files we need under /home/foo/Downloads/keepassx-2.0.3.
The concept of this process is easy to follow.
First, we build our configuration, and then we compile it for our Operating System. This process applies to any distro or any flavor of Linux with all tarball applications. Of course, every application has different config files. But they all follow the above general pattern for the installation process.
- cd /home/foo/Downloads/keepassx-2.0.3
- Takes you inside the extracted folder
- ls
- To look for an INSTALL/README file that contains detailed instructions.
- cat INSTALL
- To read the contents of the file INSTALL. You can do the same for README too.
- To read the contents of the file INSTALL. You can do the same for README too.
- ls configure.ac
- To check if you have a configure.ac file or cmake files/folders here.
- To check if you have a configure.ac file or cmake files/folders here.
- If found, just do ./configure and move to Step 10.
- If not found, you need to create a build folder to generate config files.
- mkdir build
- To make a separate build folder
- cd build
- Go into the build folder
- cmake ..
- Configure using CMakeLists.txt file from directory one-level up into the current build folder.
- Configure using CMakeLists.txt file from directory one-level up into the current build folder.
- make
- Starts building using the freshly generated config files.
- Starts building using the freshly generated config files.
- sudo make install
- Install into the system using the freshly built files from step 10.
- Install into the system using the freshly built files from step 10.
FAQs
What is Dependency Error When Trying to Run cmake or configure?
This means you don’t have the required dependencies installed in your system. If you look at the INSTALL file, you will be able to see the list of dependencies. For Ubuntu-based systems, use apt-get install to install dependencies as shown below.
What Error Do We Get When Using cmake?
Cmake stores errors in CMakeError.log. This can happen when one or more dependencies are installed but don’t have the required versions. Refer to this article to install the correct versions of packages.
Error When Using ./configure?
Autoconf application is missing. Newer Ubuntu versions don’t ship autoconf utility by default. This can be solved by installing it as sudo apt-get install autoconf.
If you want to read more about the source installation process, follow this website.
In receiving files online, we can get various types of file formats. Some of these files have common extensions, while others have unfamiliar ones, such as the TGZ files.
If you come across a file using tar.gz, .tgz, or .gz, you are looking at a TGZ compressed file. Similar to ZIP files, TGZ may contain several files that you need to extract to open and view. These files are also called tarballs and used on Unix and Mac.
Still, even if you are using Windows 10 and receive a TGZ file compression, you don’t need a Mac or Ubuntu to extract the files and view them. There are also ways on how you can open the TGZ archives on your Windows 10 PC.
How to Open or Unpack a Tar GZ File in Windows 10 Computer?
Method #1 – Unzip the File Through WinZip
- After receiving a tar.gz, .tgz, or .gz file, save it on any location on your computer.
- Click the Start menu and access WinZip.
- Go to File.
- Click Open.
- Select the TGZ file.
- Select 1-click Unzip.
- Go to the Unzip/Share tab.
- Click Unzip to PC or Cloud.
- Select the destination where you want to save the extracted files.
- Click Unzip.
- Go to the designated location.
- Double-click the files to open them.
Method #2 – Open the Files Via the Command Prompt
- Save the TGZ file to any desired location on your computer. Take note of the folder destination or copy the file location path.
- Click the Start button.
- Go to the Command Prompt.
- Right-click on it and select Run as Administrator.
- On the command prompt, type the following but replacing C:\PATH\TO\FILE\FILE-NAME.tar.gz to the file location path of the TGZ file and C:\PATH\TO\FOLDER\EXTRACTION to where you want to save the extracted file:tar -xvzf C:\PATH\TO\FILE\FILE-NAME.tar.gz -C C:\PATH\TO\FOLDER\EXTRACTION
Method #3 – Convert the TGZ File to a ZIP Format
Another way is to convert the tar.gz, .tgz, or .gz file into a ZIP file for faster file extraction. However, you will need to use a TGZ converter tool. There are available TGZ converter tools online that you can use. After converting the TGZ file, you can download the ZIP file and convert it on your PC.
Did the article help you? Let us know in the comments below.
Windows Dispatch is a website supported by its readers & community. Some pages may contain affiliate links which may allow us to earn a little money when you buy through them.
Aileen G. M.
A technology writer with a degree in Business Administration majoring in Marketing. Aileen loves creating helpful but simple guides for troubleshooting and fixing complex issues on today’s gadgets and services.
A .tar.gz file, also known as a tarball, is a compressed archive used in UNIX and Linux systems. This format involves multiple files bundled into a single archive and compressed using gzip
compression.
Although .tar.gz is commonly associated with UNIX and Linux distributions, you can also extract these files in Windows using various third-party tools.
This tutorial will show you how to extract .tar.gz files in a Windows environment.
Requirements
- A Windows system (this tutorial uses Windows 11).
- WinRAR, WinZip, and 7-Zip installed (for specific examples).
- The tar tool (for some examples).
- Access to Command Prompt.
How to Extract .tar.gz File in Windows
Since Windows doesn’t natively support .tar.gz files, extracting involves third-party tools or non-native commands. The following text outlines the process of extracting a .tar.gz file in a Windows environment.
Extract .tar.gz File in Windows Using tar Command
The tar (tape archive) command is a command-line utility for archiving files.
The command bundles multiple files and directories into a single file archive but doesn’t compress data on its own. Therefore, it is often used with compression tools, such as gzip
(tar.gz files) or bzip2
(tar.bz2 files), to reduce the overall archive size.
The tar
command is not a native Windows command. It usually doesn’t come preinstalled in older Windows systems. However, newer versions (starting from Windows 10) have it preinstalled.
The following example shows how to extract a .tar.gzip file called archive_1 using the tar
command. The archive_1 consists of three files: sample_file1, sample_file2, and sample_file3.
To extract the files using tar
:
1. Open the Command Prompt.
2. Use the cd command to navigate to the directory the archive is in. In this case:
cd C:\files
3. Use the following syntax to extract files:
tar -zxvf [archive_name.tar.gz]
This command consists of:
-z.
Specifies the input is compressed withgzip
.-x
. Stands for extract.-v
. Enables verbose mode to provide detailed output during extraction.-f
. Specifies the filename to be extracted.
For instance, in our case:
tar -zxvf archive.tar.gz
The output lists extracted files.
Note: Master the Command Prompt with our cmd commands guide which features a free downloadable cheat sheet.
Extract .tar.gz File in Windows Using 7-Zip
For a more GUI-friendly approach to extracting .tar.gz files, use 7-Zip.
Follow these steps to extract files from a .tar.gz archive:
1. Right-click the archive.
2. Find and hover over 7-Zip.
3. Choose Extract Here to extract files to the archive folder.
4. Alternatively, select Extract files to pick where to extract the files.
A new window opens to manage where and how to extract files.
Extract .tar.gz File in Windows Using WinRAR
Another way to access archive files is to extract them via WinRar. To accomplish this, follow these steps:
1. Right-click the archive.
2. Hover over the WinRar icon.
3. Choose Extract Here to extract the file to your current location.
Alternatively, select one of the offered locations or set one up by clicking the Extract files… option.
Extract .tar.gz File in Windows Using WinZip
Extracting .tar.gz files using WinZip is also quite straightforward.
To get the files, follow these steps:
1. Right-click the archive file and hover over WinZip.
2. Choose whether to unzip to one of the offered locations or define one with the Unzip to… option.
The Unzip to…option opens up another window with extra settings.
3. Select Unzip to start the process.
Conclusion
After reading this article, you know how to extract .tar.gz files in Windows using the tar
command, 7-Zip, WinZip, or WinRAR.
Next, learn how to extract .tar.gz files in Linux.
Was this article helpful?
YesNo
Readers help support Windows Report. We may get a commission if you buy through our links.
Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more
TGZ is a compressed archive file format with a TGZ or TAR.GZ extension. This is a file format that’s comparable to ZIP.
Although TGZ files are more prevalent on Mac and Unix platforms, some users might need to open TGZ archives in Windows. A TGZ archive can contain numerous files you can open after extracting the archive.
Windows 10 doesn’t include any built-in option for extracting TGZ archives. As such, you’ll need a third-party file archive utility to open a TGZ in Windows 10. You can also convert TGZ files to ZIP files using third-party apps to open them.
How can I open TGZ files in Windows 10?
1. Use Viewer Plus
With a universal file viewer dedicated tool, you can easily extract any archive-type file. We recommend FileViewerPlus for its straightforward interface, great performance, and useful features.
Test all of these and much more by downloading the free, fully functional trial.
⇒ Get FileViewer Plus
2. Use 7-Zip
There are numerous archive utilities for Windows that you can extract TGZ files with. This is how you can open a TGZ with 7-Zip.
- First, open this website page and click Download for either the 32 or 64-bit 7-Zip version.
- Open 7-Zip’s installer to add the software to Windows.
- Next, open the 7-Zip window in the snapshot directly below.
- Open the folder that includes your TGZ file within 7-Zip’s file browser.
- Select the TGZ file and press the Extract all button to open the Extract window shown directly below.
- A new folder path is already included in the Extract to text box. However, you can modify that path as required.
- Press the OK button to extract the TGZ file.
- Then double-click the extracted TGZ folder in 7-Zip to open it.
- After opening the initial archive, you’ll then need to double-click a TAR file, and perhaps another subfolder, to open its contents in 7-Zip.
- Then you can double-click the files in the archive to open them from 7-Zip.
⇒ Get 7-Zip
3. Use WinZip
-
1. Download and install WinZip.
-
2. Launch WinZip and click on File>Open.
-
3. Select the TGZ file that you want to open.
-
4. Select all the files or folders inside the TGZ file you want to open.
-
5. Once all elements selected, click Unzip and select the location where you want the files to be saved.
-
6. You will now find your TGZ extracted files in the chosen location.
An easy method to open a TGZ file is to use the third-party software called WinZip. It is the most popular compression tool with over 1 billion active users.
The app can be used for free for 45 days after the installation.
Besides compression, WinZip also gives you the possibility to protect and backup your files. Another great feature is file encryption, which enforces the security of your files.
WinZip can open the following file format types in Windows 10: RAR, ZIP, ZIPX, 7Z, GZ, ISO, TAR GZ, TAR, IMG, TGZ, GZP, and XZ files. As for Mac, WinZip can manage RAR and ZIP files.
WinZip
Open all kinds of archive file formats, including TGZ, with the help of this lightweight and extremely reliable software solution.
4. Convert TGZ Files to the ZIP Format
Windows 10’s File Explorer does include an option for extracting ZIP files. As such, you can open the contents of a TGZ by first converting it to ZIP format.
Then, you can utilize the Extract all option to decompress the ZIP. This is how you can both convert a TGZ to ZIP and then extract it.
- Open this TGZ converter web tool in your browser.
- Press the From Computer button to select a TGZ archive to convert to ZIP.
- Click the Convert button to convert the archive.
- Click Download to save the new ZIP archive.
- Open the folder that includes the converted ZIP in File Explorer.
- Double-click the ZIP to open its Extract tab.
- Press the Extract all button to open the window directly below.
- Click Browse to select a folder path to extract the ZIP to.
- Then press the Extract button.
- Thereafter, double-click the ZIP’s extracted folder to open its contents.
- Windows 11 KB5055627 update makes File Explorer more fluid
- File Explorer can restore your tabs after restart, just like a browser
- You can remove the Edit with Paint option from Explorer’s right-click menu
- How to Remove Edit with Paint From Windows 11
So that’s how you can open TGZ archives with and without file archive utilities. Note that you can also utilize the Convertio web tool for converting RAR, JAR, and LHA archive files to the ZIP format.
Check out our article for further details on some of the other open-source file archive utilities that you can extract and open TGZ and other archive formats with.
We also have a guide for unlocking the secrets of TG files on both Windows and Mac systems. If you work with GZ files, our guide on unzipping GZ files on Windows will be more than useful to you.
Following these methods should allow you to effortlessly open TGZ files. Please leave feedback in the comments below, letting us know which method worked best for you.
Matthew Adams
Windows Hardware Expert
Matthew is a freelancer who has produced a variety of articles on various topics related to technology. His main focus is the Windows OS and all the things surrounding it.
He is passionate about the tech world, always staying up-to-date with the latest and greatest. With an analytical view, he likes problem-solving, focusing on errors and their causes.
In his free time, he likes to read and write about history and tries to always develop new skills.