A .tar.gz file is a compressed archive similar to zip and RAR files. Some operating systems can handle them by default, while others require you to install a program. Regardless, extracting their contents is a quick procedure.
“Someone sent me a .tar.gz file. How can I open it?”
7 Zip is commonly used to open .tar.gz files on the Windows platform. It runs on XP, Windows 7, and Windows 8. If, after installed, 7 Zip does not automatically launch when you double-click the .tar.gz file, ensure the program is set to handle these archives by default.
- Open up 7-Zip
- Click Tools → Options.
- Go to the “System” tab.
- Make sure “tar” and “gz” are checked off.
- Click “OK”.
Now go back and try to open your .tar.gz file. 7-Zip will start up and decompress the archive. And if it still doesn’t extract, do it manually via the context menu: right-click on the archive and choose one of the “Extract” options.
OS X can handle .tar.gz files out-of-the-box since it’s a UNIX-based operating system. Just double-click the archive and it will extract to a folder of the same name.
You can also extract .tar.gz archives from the command prompt in OS X by following the instructions in the “Linux” section below. Execute these commands with the Terminal application (or my preferred alternative, iTerm).
Assuming the archive file in questions is called example.tar.gz, use the following command:
tar -zxvf example.tar.gz
This will extract the archive’s contents into a folder of the same name.