How to Open .tar.gz Files

by Tom Harrison in windows mac os x

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.

Advertisement

“Someone sent me a .tar.gz file. How can I open it?”

Contents

Windows

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.

  1. Open up 7-Zip
  2. Click Tools → Options.
  3. Go to the “System” tab.
  4. Make sure “tar” and “gz” are checked off.
  5. 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.

Screenshot of the 7-zip context menu in Windows 7
The right-click context menu of 7-Zip, which includes options to extract the contents into a variety of locations.

Mac OS X

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).

Linux

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.

Topics