Tutorial To Unzip Gz File In Linux
Gzip by GNU is a popular data compression program and the GZ file is an archive file compressed by the standard Gzip. It was developed by Jean-loup Gailly and Mark Adler initially on October 31, 1992.
How To Unzip (Open) Gz File
Programs To Open Gz File
For Windows operating system:
- Corel WinZip
- File Viewer Plus
- Corel WinZip Mac
- Incredible Bee Archiver
- Apple Archive Utility
- Smith Micro StuffIt Deluxe Mac 16
For Linux based operating systems:
Steps to unzip Gz File in Linux-based operating systems. Run the following command to unzip the Gz file to its original state and remove the original
gzip -d file-Name.gz
Steps to extract tar.gz file.
Run the following command to extract tar.gz file in Linux based operating systems like Ubuntu, Linux Mint, CentOS, Fedora OS, Pop OS, Elementary OS, RedHat, and other Linux distro:
tar -xf archive-name.tar.gz
Unzip gz File with gunzip Command:
gunzip < filename.tar.gz > filename.tar
How To View Content Of an Archived Folder Without Extracting
Run the following command to view the content of the tar.gz file in Linux without extracting it.
tar -tvf filename.tar.gz
Extract .tar.gz, .tgz, .gz tarballs using tar on Windows 10/ Windows 11
Go through the following steps to extract .tar.gz, .tgz, .gz as well as .zip files using tar on Windows 11.
Open command with administrator privilege and type the following command to use tar to extract the files on Windows 11.
tar -xvzf C:\PATH\TO\FILE\FILE.tar.gz -C C:\PATH\TO\FOLDER-NAME\EXTRACTION
Extract .tar.gz, .tgz, .gz tarballs using tar on Linux on Windows (WSL)
Run the following command to extract .gz files on Linux on Windows ( Linux On WSL)
sudo tar -xvzf /mnt/c/Path/To/Tar-file/Desktop/Filename.tar.gz -C /mnt/c/Path/To/Destination/folder
Summary: Let us know if you want to add more commands in this post. Please share your suggestion in the comment box below.