How to quickly extract .tar.gz file on Windows 10

How to quickly extract .tar.gz file on Windows 10

A file using the .tar.gz format is a file that was created using a Unix-based archiving application and then compressed using the gzip tool. These files are often referred to as tarballs. Although you can find them with the .tar.gz extension, the file extension can also be shortened to .tgz or .gz.

Typically, tar files are commonly used by Ubuntu and macOS users for data storage and backups, but sometimes Windows 10 users may also come across these types of files and need to extract its contents.

While you can use some third-party apps like 7-Zip and PeaZip, sometimes these apps can’t work well with files created on other platforms and are very slow to unzip one. large number of files.

Windows 10 includes native support for tar. You can use Command Prompt to unzip these files. Alternatively, you can even use Windows Subsystem for Linux (WSL), which brings native support for Ubuntu, Fedora, and SUSE, so you can also access a variety of Linux tools, including tar for decompression. Quick content from tarball.

In this tutorial, you will learn the steps to use root tar commands on Windows 10 using Command Prompt and Ubuntu to extract the contents of the .tar.gz file.

Extract tarball .tar.gz, .tgz or .gz using tar on Windows 10

To extract .tar.gz, .tgz, .gz as well as .zip files using tar on Windows 10, follow these steps:

1. Open Start on Windows 10.

2. Open Command Prompt with admin rights.

3. Type the following command to use tar to unzip the files and press Enter :

tar -xvzf C:PATHTOFILEFILE-NAME.tar.gz -C C:PATHTOFOLDEREXTRACTION
Extract tarball .tar.gz, .tgz or .gz using tar on Windows 10

Quick Tip : In the command, make sure to update the syntax to include the source and destination paths. Also, since you are already using tar on Windows 10, you don’t need to specify the path as if you were running Linux. You can only use the path format used by Windows.

Upon completion of the steps, after a while, you will have all the files and folders extracted to the destination path you specified.

Assume that you have unzipped a tarball created on another system, so we omit some arguments that are usually necessary to protect permissions, but not necessary on Windows 10 to access files.

Extract tarball .tar.gz, .tgz or .gz using tar in Linux on Windows 10

To use tar on Linux, you need to install a distribution (such as Ubuntu) by enabling Windows Subsystem for Linux (WSL), then installing Ubuntu from the Microsoft Store.

To extract the .tar.gz file using Linux on Windows 10, follow these steps:

1. Open Start.

2. Search for Ubuntu and click on the top result to open the application.

3. Type the following command to extract the contents 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
Extract tarball .tar.gz, .tgz or .gz using tar in Linux on Windows 10

Quick Tip : In the command, make sure to update the syntax to include the source and destination paths. If there is only one .tar file, you can use the same command described above, but not include the z argument.

In the above command, for example type sudo to run the application with admin privileges, tar to call the app and then give it some arguments, including:

x – Instruct tar that you want to unzip the content.

v – This is an optional argument to show the extraction process. If not, you’ll only see your cursor blink until the process is complete.

z – Tell tar to extract the contents of the .tar.gz file using gzip.

f – Instruct tar the name of the file you are about to extract.

Then, you need to specify the path of the tarball file you want to extract. You may have noticed that the path starts with / mnt / c / , instead of c: , and this is because we actually work in the Linux world.

-C – Used to tell tar to change directory. When executing the command, you start in the source directory and then you need to specify the destination directory, which is the specified post path to complete the command. You can unzip files to any directory you want, but remember to start the path with / mnt / followed by the Windows path.

It is important to pay attention to upper and lower case letters while typing a command in Linux.

In this tutorial, make tech easier than ever to look at the basic steps to perform a specific task. If you’re not a Linux user, there’s a lot to learn about tar. If you want to learn more about this tool, in the Ubuntu control panel, type tar --help .

1