Step-by-Step Tutorial: Opening and Retrieving Contents From tar.gz Bundles in Windows
Step-by-Step Tutorial: Opening and Retrieving Contents From tar.gz Bundles in Windows
Quick Links
- What is a Tar.gz File?
- How to “Unzip” or Extract a Tar.gz File on Windows
- How to Extract or Unzip tar.gz Files Using Bash on Windows 10 or 11
Key Takeaways
To open or extract a tar.gz file on Windows, you can install the free 7-Zip File Manager utility, or you can use the tar -xvf command from the Bash prompt included in the Windows Subsystem for Linux.
Windows, by default, has no idea what a TAR.GZ file could possibly be, despite the format being quite common. Thankfully it isn’t hard to get Windows to open a tar.gz file.
What is a Tar.gz File?
A tar.gz file is actually a combination of two different types of files formats: a tar file , and a gzip file. Tar files, or tarballs, are a collection of files wrapped up together for easy storage as a single file, but without any compression. Once they have been combined, they are then gzipped into a .gz file to reduce the space used on disk—usually by a lot. It is a lot like ZIP or RAR files, except it is much less common on Windows.
Tar.gz has become the standard format used for distributing Linux and open source software since it’s easy to extract on basically any platform that isn’t Windows.
How to “Unzip” or Extract a Tar.gz File on Windows
The easiest way to open a tar.gz file on Windows is to install an excellent free utility called 7-Zip , which can handle tar.gz and just about any other file format. We’ve been recommending this app for years, and it’s one of the first things that we install whenever reinstalling Windows.
Once you’ve downloaded and installed 7-Zip, double-click on the tar.gz file that you’re trying to open, and then select “Choose an app on your PC” from the popup dialog that shows up.
Browse down to the location where you installed 7-Zip, which is usually going to be some variant of C:\Program Files\7-Zip , and then find the 7zFM.exe file—it’s important that you select this one and not the other files in the folder, because the other ones won’t work.
Once you’ve selected the right file, you’ll see “7-Zip File Manager” show up in the select app dialog. If you want 7-Zip to always handle tar.gz files in the future, you’re going to want to select the “Always” button at the bottom of the dialog.
Once you’ve done this successfully, you’ll notice that the icon for tar.gz files will change to a 7-Zip icon.
And now you can use the 7-Zip File Manager to open, view, or extract files from tar.gz and other archives. If you want a specific file, you can drill down into the folder, or you can simply click the “Extract” button and choose a location to put all the files.
It’s worth noting that you can also use WinRAR to open tar.gz files, but we’re partial to 7-Zip here since it’s totally free and can even extract .RAR files , so that’s what we’re recommending.
You can also just change the association between tar.gz files and 7-Zip in the Settings later if you want. Open the Settings app (Windows+i), then navigate to Apps > Default apps > Choose Defaults by File Type, then scroll to the “.gz” section. You won’t actually find a “.tar.gz” in the file format list.
| | File Types | |
| ————- | —————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————- |
| Extension | DAT · 7Z · BZ2 · XML · RTF · XLSX · WEBP · EPUB · MP4 · M4A · AVI · MOBI · SVG · MP3 · REG · PHP · LOG · PPTX · PDF · MPEG · WMA · M4V · AZW · LIT · TAR · TAR.GZ · RAR |
How to Extract or Unzip tar.gz Files Using Bash on Windows 10 or 11
If you don’t feel like installing third-party software on your PC, and you’re down for some geek activity, you can actually extract files from a tar.gz archive from the Bash shell included in the Windows Subsystem for Linux . You’ll first need to follow the directions to install WSL on Windows 10 or Windows 11 , open the Ubuntu app or whatever version of Linux you installed, and then you can simply use the following command:
tar -xzf tarfile
You’ll want to replace “tarfile” with the path to the tar.gz file that you’re trying to extract. For a more detailed explanation on how the tar command works, be sure to read our guide to compressing and extracting files in the Linux Terminal . The tar command is extremely powerful, and you can do things like list or search for files in a tar archive , or extract a single file.
It’s also worth noting that you can use the Bash shell to extract tar.bz2 files as well because the Linux terminal is insanely powerful—it doesn’t get better than the GUI of Windows and the Terminal of Linux combined into a single operating system. Unless you get a Mac , of course.
| | Linux Commands | | |
| —————– | ———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————— | |
| Files | tar · pv · cat · tac · chmod · grep · diff · sed · ar · man · pushd · popd · fsck · testdisk · seq · fd · pandoc · cd · $PATH · awk · join · jq · fold · uniq · journalctl · tail · stat · ls · fstab · echo · less · chgrp · chown · rev · look · strings · type · rename · zip · unzip · mount · umount · install · fdisk · mkfs · rm · rmdir · rsync · df · gpg · vi · nano · mkdir · du · ln · patch · convert · rclone · shred · srm · scp · gzip · chattr · cut · find · umask · wc · tr | |
| Processes | alias · screen · top · nice · renice · progress · strace · systemd · tmux · chsh · history · at · batch · free · which · dmesg · chfn · usermod · ps · chroot · xargs · tty · pinky · lsof · vmstat · timeout · wall · yes · kill · sleep · sudo · su · time · groupadd · usermod · groups · lshw · shutdown · reboot · halt · poweroff · passwd · lscpu · crontab · date · bg · fg · pidof · nohup · pmap | |
| Networking | netstat · ping · traceroute · ip · ss · whois · fail2ban · bmon · dig · finger · nmap · ftp · curl · wget · who · whoami · w · iptables · ssh-keygen · ufw · arping · firewalld | |
- Title: Step-by-Step Tutorial: Opening and Retrieving Contents From tar.gz Bundles in Windows
- Author: Edward
- Created at : 2024-08-27 18:34:33
- Updated at : 2024-08-29 12:24:24
- Link: https://vp-tips.techidaily.com/step-by-step-tutorial-opening-and-retrieving-contents-from-targz-bundles-in-windows/
- License: This work is licensed under CC BY-NC-SA 4.0.