1. Home
  2. Internet Tips
  3. Unzip gz file

Unzip GZ File: How to Open GZ Files on Windows & Linux (CMD Guide)

Archives are compressed files that allow you to store other types of files into smaller containers. It makes it possible to reduce the overall file size so that you can upload it online or transfer it on removable storage devices with a limited storage capacity.

Popular archive file types include ZIP and RAR. But there are many others and each has its own characteristics.

Unzip GZ File

What is a .gz file?

GZ files are a kind of archive formats that were compressed with the standard GNU zip (gzip) compression algorithm. They are commonly used on UNIX-based operating systems like Linux distros and macOS. That doesn’t mean you can’t open a GZ file on Windows, too.

If you’ve seen the tar.gz or .tgz file types before, know that they are TAR files (tarballs) that were compressed with gzip.

How to Open GZ File

To unzip a GZ file on Windows, Linux or macOS, you need an archiving tool that supports the .gz file extension.

7-Zip is an excellent tool for Windows and Linux. It’s a free archiving utility for both personal and commercial purposes, which offers support for the .gz file extension.

Unzip GZ Files on Windows

Here’s how to unzip GZ files with 7-Zip on Windows using the graphical interface:

  1. Download 7-Zip from the official websiteThe 7-Zip download page
  2. Set up 7-Zip on your computer
  3. Launch the 7-Zip File Manager from the Windows 10 Start menuWindows 10 shows the 7-Zip File Manager in the Start menu
  4. Navigate to your GZ file and open it7-Zip shows a tar.gz file in the GUI

Windows command line unzipping

If you’re wondering how to extract tar.gz files in the Windows command-line console, here’s exactly what you need to do:

  1. Make sure that 7-Zip is installed on your computer
  2. Open a Command Prompt window
  3. Register 7-Zip as a system PATH environment variable using setx path "%path%;C:\Program Files\7-Zip". If you installed 7-Zip in a different folder than default, correct the path in the command7-Zip shows how to use the tar.gz command
  4. Extract files from the tar.gz using 7z e filename.tar.gz. For example, 7z e AddictiveTips2.tar.gz
  5. 7-Zip will extract the files to the same location as the tar.gz
    Now you can extract the files from the .tar using the same command: 7z e filename.tar. For example, 7z e AddictiveTips2.tar

There are a few alternative solutions to 7-Zip capable of extracting files from GZ archives, such as WinRAR, WinZip, and File Viewer Plus.

Unzip GZ files in Linux

If you need to know how to unzip GZ file in Linux, you can still use the same 7-Zip command as in Windows: 7z e filename.z or 7z e filename.gz.

And, if you’re running macOS, you can download Keka and use it to open GZ files.

Unzip GZ: Conclusion

To summarize, you can easily extract files from archives with the .gz file extension by turning to archiving tools that support this format. 7-Zip is an awesome choice for Windows and Linux users since it’s completely free for both personal and commercial purposes.