GZ files are common compressed files that are created by the gzip compression utility. If you have just downloaded any GZ files and are unsure about how to unzip GZ file, this guide will help you go through them.
Windows users do not get a chance to work with this GZ format too often, because it is mostly used in UNIX and Linux systems. Yet, these files are critical on Windows systems since they contain important information such as the original file name and timestamp.
Considering its importance, in this guide, we have covered, what a GZ file is and how to unzip GZ file on Windows, Linux, and macOS.
What Is a .GZ File?
Like any other compressed files .ZIP, .RAR, .ARJ, .GZ is also an archive file type that combines your files and folders into a single file. .GZ file makes use of the compression algorithm and saves disk space. The compressed file remains unreadable until it is uncompressed.
You can easily extract and open the compressed GZ archive files using built-in tools and other third-party tools on your devices. In the upcoming section, you will explore more about it.
How to Unzip GZ File in Windows?
Here are two simple ways to unzip GZ file on your Windows PC. You can follow and implement the steps whichever suits you.
Option 1: Unzip GZ File on Windows Using Command Prompt
By using the tar command in Windows Terminal or Command Prompt, you can easily extract GZ file archive contents in a single click. This tar command is built into your OS and so you do not need to download/install any third-party tools to use it.
Follow as instructed to unzip a GZ file on your Windows PC.
- Go to the Start menu and type cmd or command.
- Now, click on Run as administrator to open the command prompt window as an administrator.
- Then, type the following command in the command window. Make sure you replace SOURCE with the source file and DESTINATION with the target file/folder.
- tar -xvzf PATH\TO\SOURCE -C PATH\TO\DESTINATION
- Next, hit Enter to execute the command.
Option 2: Open the GZ file online on Windows Using 7-Zip Tool
If you prefer using a tool to open a GZ file on your Windows PC, there are a lot of alternatives to do that. Since 7 Zip is one of the easily available free, open-source tools available on the internet, you can make use of it to unzip your files.
- Go to the free 7-Zip tool download page.
- Now, click on the Download link as displayed here.
- Once the tool is installed on your system, launch it and navigate to your GZ file in File Explorer.
- Once you have navigated the GZ file, click on it.
- Then, click on the Extract option in the top toolbar.
- Next, go to the Extract to folder.
- Now, find and select the target folder where you want to save the files.
- Go to the targeted files when all the zipped files are extracted. You can see all the extracted files in there.
How to Unzip GZ File in MacOS?
You would need to use a few third-party apps to extract a few file formats like RAR on macOS. But, in contrast, you can easily extract the GZ files using the terminal as instructed below.
Option 1: Unzip GZ File on macOS Using Terminal
By using the terminal on your macOS device, you can extract all the archived files within a single command. All the files will appear in a new folder in the same directory as the original GZ file.
To use the terminal to extract GZ files on your macOS, follow these instructions.
- Click on the Launchpad in the Dock of your macOS device and search for Terminal.
- Then, click on Terminal Utility to open it.
- Type the cd command to type into the folder that has your GZ file. For example, if your GZ file is in Desktop, you would need to type cd ~/Desktop. Then, click on Return.
- Type the gunzip filename.gz command in the utility to extract the files. Make sure you replace the filename with the GZ file name. For example, if your file is named sample, then you would need to type gunzip sample.gz and press Return.
- Hit Enter to execute the command. Now, the terminal extracts the file from the GZ archives.
Option 2: Unzip GZ File on MacOS Using Mac Archive Utility
Your Mac device has a built-in utility called Archive Utility that helps you to unzip the GZ files easily on your device without using any software.
Follow these instructions to unzip the GZ files on a macOS device.
- Click on the double-toned smiley face icon on your Mac device’s dock.
- Then, open the folder that has the GZ file in it. For example, if the archived file is in the Desktop folder, open it.
- Now, double-click on the GZ file to extract it or you can click on Ctrl when you select the file. Then, click on Open with and then, press the Archive Utility.
How to Unzip GZ File in Linux?
There are so two easy ways to unzip GZ files in Linux. They are instructed below.
Option 1: Open GZ File Unzipped on Linux Using Built-in Tool
Your Linux device has a built-in graphical utility. This utility helps you to unzip the GZ files easily on your device without any apps. Follow as instructed below.
- Go to the File Explorer on your device.
- Then, open the folder that has the GZ file in it. For example, if the archived file is in the Desktop folder, open it.
- Now, right-click on the GZ file and then choose the Extract here The files and folders in the GZ file will be unzipped in the same folder you are in.
Option 2: Unzip GZ File on Linux Using gzip Utility
You can make use of the terminal on your Linux device, to extract all the archived files in a single command. All the files will appear in a new folder in the same directory as the original GZ file.
To use the terminal to extract GZ files on your macOS, follow as instructed below.
- Click on the Ctrl + Alt + T shortcut keys on your Linux system simultaneously to launch the Terminal
- Type the cd command to type into the folder that has your GZ file. For example, if your GZ file is in Desktop, you would need to type cd ~/Desktop. Then, click on Return.
- Type the gunzip filename.gz command in the utility to extract the files. Make sure you replace the filename with the GZ file name. For example, if your file is named sample, then you would need to type gunzip sample.gz and press Return.
- Hit Enter to execute the command.
- If you want to unzip a .TAR.GZ file, type the following command to extract the GZ archives. Make sure, you replace the desktop with the path to the GZ file.
- tar -xf desktop.tar.gz
- Now, the terminal extracts the file from the GZ archives.
Final Words
That’s it! It’s all about how to open GZ files online on Windows, Linux and MacOS devices. Hope our guide works for you.
If you have any queries regarding this guide, feel free to drop them on the Facebook page. We will give our utmost efforts to resolve them instantly.
Good Luck..!
Hardeep has always been a Windows lover ever since she got her hands on her first Windows XP PC. She has always been enthusiastic about technological stuff, especially Artificial Intelligence (AI) computing. Before joining PC Error Fix, she worked as a freelancer and worked on numerous technical projects.