What Is a GZ File and How Do You Unzip It?


Have you gotten a GZ file, and you’re not sure how to open it? This guide will tell you what a GZ file is and how you open it on Windows, Mac, and Linux computers.

It’s fairly easy to view the contents of a GZ file on any of the popular platforms, and there are even multiple ways to do this.

Let’s check them all out.

What Is a GZ File?

A GZ file is basically an archive compressed using the gzip compression technology (learn how compression works). Like other file archives, this archive type helps you combine your files and reduce the size of your files by compressing them.

Like RAR and ZIP, you can open and extract files from a GZ archive using both built-in as well as third-party tools on your computers.

How to Unzip a GZ File on Windows

Windows 10 offers various ways to open GZ files. If you prefer commands, you can use the Command Prompt method. In case you’re a graphical user interface person, you can use a free third-party app to access your GZ archives.

Here we cover both methods.

How to Unzip a GZ File Using the Command Prompt

There’s a command called tar that you can use within the Command Prompt to extract your GZ archive contents. This command is built into your operating system, and so you don’t need to install anything to use it.

Related: Windows Command Prompt (CMD) Commands You Must Know

Once you have your GZ file handy with you, use these steps to extract your file’s contents:

  1. Open the Start menu, search for Command Prompt, and click Run as administrator.
  2. Click Yes in the prompt.
  3. Type the following command replacing SOURCE with the source GZ file and DESTINATION with the target folder and hit Enter.

  4. If all goes well, your extracted files should be available in your destination folder.

Unzip GZ using the Command Prompt

If your target folder looks empty even after successfully running the command, that’s probably because you ran the Command Prompt without admin privileges. Open the tool with admin rights, and you should be fine.

How to Unzip a GZ File Using an App

There are many free apps on the market to unzip a GZ file on your PC. 7-Zip is a pretty good choice for this task, as it’s easy, free, and open-source.

Here’s how you use this app to decompress GZ archives on your PC:

  1. Download and install the free 7-Zip tool on your PC.
  2. Open the tool and navigate to your GZ file using the built-in file manager.
  3. Select your GZ file in the list, and click Extract in the top toolbar.
  4. Choose the target folder in the Extract to section.
  5. Tweak other options if you want, and then click OK.
  6. Open the target folder, and you should have all your GZ file’s contents there.

Unzip GZ using 7-Zip

How to Open a GZ File on macOS

In macOS, archive types like RAR require you to use an app to decompress your files, but you don’t need to do that for GZ.

You can open GZ files without using any third-party tools on your Mac.

You can either use the Terminal to extract files from a GZ archive or use a built-in macOS tool to decompress your files.

Here are both methods for you.

How to Unzip a GZ File on macOS Using the Built-In Tool

Like ZIP, you can simply double-click on your GZ archive, and it should start extracting its content. You can do this from any Finder window on your Mac, and your extracted files will be available in a new folder in the same directory as the original GZ archive.

If that doesn’t work for you, make sure you’re opening your GZ file with the built-in unarchiver tool. If you aren’t sure what’s the default archive handler on your Mac, simply right-click on your GZ archive and select Open With > Archive Utility to open the archive with the built-in tool.

Unzip GZ using the Finder

Another way to open a GZ archive in macOS is to use a free app called The Unarchiver. This app supports several other formats as well, including ZIP and RAR.

How to Unzip a GZ File on macOS Using the Terminal

Using the Terminal, you can extract all the files inside your GZ archive using a single command. Your files will be placed in a new folder in the same directory as the original GZ file.

Here’s how you utilize this method:

  1. Click the Launchpad in the Dock, search for Terminal, and click the utility.
  2. Enter the following command, replace source.gz with the path to your GZ file, and hit Enter.

    gunzip -k source.gz
  3. The Terminal will start extracting files from your specified GZ archive.

Unzip GZ using the macOS Terminal

How to Unzip a GZ File on Linux

If you’re a Linux user who wants to open a GZ file, you can use a command in the Terminal to extract all the files from your GZ archive.

Gzip is the command that lets you decompress the contents of a GZ archive on your Linux machine.

Here’s how you use this command and start extracting your compressed files:

  1. Open the Terminal utility.
  2. Type the following command, replace SOURCE.GZ with the path to your actual GZ file, and hit Enter.

    gzip -dk SOURCE.GZ
  3. Your GZ archive should now be extracted.
  4. If yours is a .TAR.GZ file, you need to use a different command to extract your archive. Run the following command in the Terminal to unzip TAR.GZ files.

    tar -xf SOURCE.tar.gz

Extracting GZ Files on Windows, Mac, and Linux

GZ files have been around for quite a long time. If you’re coming across one for the first time, use one of the methods above to extract the contents from your GZ archive. The above methods work on all the popular platforms, including Windows, Mac, and Linux.

JAR is yet another not-so-common format that you may come across on your computer. Luckily, there are ways to extract files from this file format as well.


How to Open JAR Files in Windows 10

Have you ever come across the JAR file type? Here’s what that is and how to open JAR files in Windows 10.

About The Author


Products You May Like

Leave a Reply

Your email address will not be published. Required fields are marked *