How to extract file.tar.gz in Windows 11

Diposting pada


Windows 11 includes native support for extracting files “.tar.gz” use Command Prompt without the need for third-party tools. You can even use a Linux distro via the Windows Subsystem for Linux (WSL) to quickly extract tarballs built on other platforms.

When you view the files .tar. gzmeaning it’s a file created using a Unix-based archive application tar then compressed using compression gzip . This file is often referred to as a “tarball”. While you may find it written as a double extension (.tar.gz), it can also be written as .tar.gz .tgz or .gz. (It should be noted that Linux does not use a file extension. Instead, the file type is part of the file name.)

While tar files are typically more common in Linux (for example, Ubuntu) and macOS distros for backup and archiving, you might also find these files in Windows 11. You can use third-party tools like 7-Zip And PeaZipbut it’s not recommended because it doesn’t always work for files .tar. gz addition. Instead, you should use the native tar support available in Windows 11 or a Linux distro on WSL.

In this guide, you will learn the steps to use the native tar command in Windows 11 using Command Prompt and Ubuntu to extract the contents of file.tar.gz.

Extract.tar.gz,. tgz,.gz tarballs on Windows 11 use tar

To extract .tar.gz, .tgz, .gz, and .zip files using tar on Windows 11, use these steps:

Open Start on Windows 11.

@media custom screen and (min-width: 0px) and (min-height: 0px) { div[id^=”bsa-zone_1659356505923-0_123456″] { min-width: 300px; min-height: 250px; } } @media just screen and (min-width: 640px) and (min-height: 0px) { div[id^=”bsa-zone_1659356505923-0_123456″] { min-width: 300px; min-height: 250px; } }

Search Command Promptright-click the top result, and choose an option Run as administrator .

Type in the following command to use tar to extract files and hit it Enter:

tar-xvzf C:/PATH/TO/FILE/FILE-NAME.tar.gz -C C:/PATH/TO/FOLDER/EXTRACTION

In the command, modify the command to include source and destination paths.

After you complete the steps, files and folders will be extracted to the specified destination.

Assumes the tarball was created on another system. Also, we missed some commonly useful options for retaining permissions as they are not required in Windows 11.

Extract tarball.tar.gz,.tgz,.gz on Windows 11 using Linux tar

You must first install a distro using the Windows Subsystem for Linux before you can extract the tarball on Linux.

To extract files .tar. gz using Linux, use these steps:

Open Start.

Browse Ubuntu and click the top result to open the app.

p>

Type the following command to extract the contents of the file .tar. gz 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 source and destination paths. If it’s just a file .taruse the same command but ignore arguments z.

We use the sudo command to run the tool as administrator, tar to invoke the application, and we use these options:

x — instructs tar you want to extract the contents of. 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 compress the contents of the “.tar.gz” file with gzip. f — instructs the tarball the name of the file to extract.

After the options, you have to specify the path of the tarball file to extract. In the command, we start the path with /mnt/c/ because it is Linux, not Windows.

the -Option C — (hyphens and capital letters C) is used to change folders, and you must specify the destination path, which starts with the /mnt/ annotation followed by the Windows path.

You should pay attention to uppercase and lowercase letters when typing Linux commands because “Desktops” not equal to “desktops”.

These are the basic options for extracting “.tar.gz” files, 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 archive formats to File Explorer. Support is expected to arrive with the Windows 11 23H2 release.

@media only screen and (min-width: 0px) and (min-height: 0px) { div[id^=”bsa-zone_1659356403005-2_123456″] { min-width: 300px; min-height: 250px; } } @media just screen and (min-width: 640px) and (min-height: 0px) { div[id^=”bsa-zone_1659356403005-2_123456″] { min-width: 300px; min-height: 250px; } }

Closing

Thus the article about How to extract file.tar.gz in Windows 11
I hope the information in the article is useful to you. Thank you for taking the time to visit this blog. If there are suggestions and criticisms, please contact us : admin@bocahhandal.com