A file using .tar.gz format is basically a file that has been created using the Unix-based archival application tar and then compressed via gzip compression. These files are mostly referred to as “tarballs,” and when you can find them along with a double extension (.tar.gz), the extension can also be shortened to .tgz or .gz as well. In this article, we are going to talk about How to Extract tar gz Windows – Tutorial. Let’s begin!
Mostly, tar files are commonly used via Ubuntu and macOS users for data archival and backups. However, most of the time Windows 10 users may also come across these types of files and you may need to extract its contents.
However, you can use a number of third-party applications such as 7-Zip and PeaZip. Most of the time these apps do not play well with files created on another platform, and they are slow to uncompress a large number of files. But, Windows 10 includes native support for tar that you can use with Command Prompt in order to extract these files. Also, you guys can even use the Windows Subsystem for Linux (WSL) that brings native support for Ubuntu, Fedora, and SUSE as well. Therefore you can also access many Linux tools, that include tar to instantly extract content from tarballs.
So, in this guide, you guys will learn the steps to use native tar commands on Windows 10 via Command Prompt and Ubuntu in order to extract the content of a .tar.gz file.
In order to extract .tar.gz, .tgz, .gz as well as .zip files using tar on Windows 10. Then you have to use these simple steps:
- First, open Start on Windows 10.
- Then search for Command Prompt, right-click the first result, and choose the Run as administrator option.
- Then type the following command to use tar to extract the files and tap on Enter:
tar -xvzf C:\PATH\TO\FILE\FILE-NAME.tar.gz -C C:\PATH\TO\FOLDER\EXTRACTION
When you complete all the steps, then after a few moments. You will have all the files and folders extracted to the destination path that you specified.
It is assumed that you are extracting a tarball that was created on another system actually. Therefore we are skipping some of the arguments mostly necessary to preserve permissions. That on Windows 10 is not important to access the files.
In order to use tar on Linux, you need to install a distro (such as Ubuntu) through enabling the Windows Subsystem for Linux (WSL). Using the Windows Features experience, and then installing Ubuntu from the Microsoft Store as well.
In order to extract a .tar.gz file via Linux on Windows 10. Then you have to use these steps:
In the above command, we type
sudo in order to run the application as an administrator.
tar to call the application, and then we fed it some arguments, that includes:
- x — basically instructs tar that you want to extract content.
- v — verbose. This is actually an optional argument to display the extraction process. Otherwise, you will only see a blinking cursor until the process is complete.
- z — tells tar to uncompressed the content of a .tar.gz file along with gzip.
- f — instructs tar the name of the file that you are about to extract.
Then you have to specify the path of the tarball file you want to extract. You will notice that the path starts along with
c:\, and this is because we are actually working in the Linux world as well.
-C — (hyphen and capital C) is basically used to tell tar to change folders. When you are executing a command, then you start in the source folder, and then you have to specify the destination folder, that is the path we specified in order to complete the command. You can also extract the files to any folder you want, however, remember to start the path with
/mnt/ followed by the Windows path.
It’s very necessary that you pay attention to uppercase and lowercase while typing a command in Linux as Desktop is not the same as desktop actually.
Via third-party software
You guys can also use third-party software in order to extract compressed files.
Open TGZ files along with 7-Zip
7-Zip is basically a free, open-source file archiver along with a high compression ratio. This software can be used on any computer, that includes the ones in a commercial organization. This utility program can also help you extract compressed files and create your own compressed files in many different formats. In order to extract TAR files via 7-Zip, then you have to follow the below steps:
- First, open the 7-Zip webpage and download either 32 or 64-bit 7-Zip version based on your System Type.
Note: In order to check your system type, you need to open ‘Settings’ then go to ‘System’ and click on ‘About’.
- When you download that, open the 7-Zip installer in order to install the software to your Windows system.
- Next, you have to open the 7-Zip app from the Search Menu.
- Now, within the 7-Zip’s file browser head to the folder that includes your TGZ file.
- Then choose and right-click the TGZ file, tap, 7-zip, and click the Extract files to open the Extract window
- You will then see a new folder path is already included in the ‘Extract to’ text box. However, if you want you can modify this path as needed.
- Tap ‘OK’ in order to extract the TGZ file.
- Now, double-click the extracted TAR folder in the same 7-Zip window in order to open it.
When you open the initial archive, then double-click on the sub TAR folders or files to open and have a look at the contents.
Convert TGZ Files to the ZIP Format via online TGZ converter
Windows 10’s File Explorer also allows the users in order to extract ZIP Files. Intrinsically, you guys can open the contents of a TGZ file through converting it to the ZIP format first. When the files are converted, then users can utilize the ‘Extract All’ option in order to decompress the ZIP. You can also convert TGZ files to ZIP format via online converters, Let’s see how to do that:
- First, open the Convertio web tool in your web browser. This is actually an Online TGZ (TAR.GZ) Converter that can convert files to and from tgz on the web as well.
- Now choose ‘Choose Files’ in order to select a TGZ archive to convert to ZIP.
- Choose the file from the folder and then tap ‘Open’ to add the file to the online converter.
- Then select the conversion type to ‘Zip’
- Now tap on the ‘Convert’ button in order to convert the archive.
- Tap ‘Download’ and then save the new ZIP archive.
- Head to the downloaded files folder and double-tap the downloaded ZIP file to open its Extract tab. Now, tap on the ‘Extract all’ button in order to open the window directly below.
- Choose the Destination and then tap Extract.
Now you have to double click the ZIP’s extracted folder and then open its content.
Alright, That was all Folks! I hope you guys like this article and also find it helpful to you. Give us your feedback on it. Also if you guys have further queries and issues related to this article. Then let us know in the comments section below. We will get back to you shortly.
Have a Great Day!
Also See: How To Remove Windows Hello PIN Sign-In Options