Logo
  • Ubuntu
  • CentOS
  • Debian
  • Fedora
  • RedHat

How to Unzip (Open) Gz File - DesignLinux

designlinux 0 Comments

Gzip is a popular compression algorithm that reduces the size of a file while keeping the original file mode, ownership, and timestamp. This algorithm is often used to compress web elements for faster page loading.

By convention, a file compressed with gzip ends with either .gz or .z.

This article explains how to open (or unzip) .gz files.

Unzipping gz File #

On Linux and macOS, you can decompress a .gz file using the gzip utility. The syntax is as follows:

gzip -d file.gz

The command will restore the compressed file to its original state and remove the .gz file.

To keep the compressed file pass the -k option to the command:

gzip -dk file.gz

Another command that you can use to decompress a .gz file is gunzipThis command is basically an alias to file with gzip -d.

To open a .gz file with gunzip simply pass the file name to the command:

gunzip file.gz

If you’re on a desktop environment and the command-line is not your thing, you can use your File manager. To open (unzip) a .gz file, right-click on the file you want to decompress and select “Extract”.

Windows users need to install additional software such as 7zip to open .gz files.

Extracting tar.gz File #

Gzip algorithm is designed to compress only a single file. Files that end in .tar.gz are .tar archives compressed with gzip.

To extract a tar.gz file, use tar command with the -xf options followed by the compressed archive name:

tar -xf archive.tar.gz

The command will auto-detect the compression type and will extract the archive in the current working directory.

Conclusion #

To decompress a .gz file, use the gunzip command followed by the file name.

If you have any questions, please leave a comment below.

gzip terminal

Related

Tags: gzip, terminal

How to Install and Use FFmpeg on Debian 10

Prev Post

How to Install TeamViewer on Ubuntu 20.04

Next Post
Archives
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • July 2022
  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
Categories
  • AlmaLinux
  • Android
  • Ansible
  • Apache
  • Arch Linux
  • AWS
  • Backups
  • Bash Shell
  • Bodhi Linux
  • CentOS
  • CentOS Stream
  • Chef
  • Cloud Software
  • CMS
  • Commandline Tools
  • Control Panels
  • CouchDB
  • Data Recovery Tools
  • Databases
  • Debian
  • Deepin Linux
  • Desktops
  • Development Tools
  • Docker
  • Download Managers
  • Drupal
  • Editors
  • Elementary OS
  • Encryption Tools
  • Fedora
  • Firewalls
  • FreeBSD
  • FTP
  • GIMP
  • Git
  • Hadoop
  • HAProxy
  • Java
  • Jenkins
  • Joomla
  • Kali Linux
  • KDE
  • Kubernetes
  • KVM
  • Laravel
  • Let's Encrypt
  • LFCA
  • Linux Certifications
  • Linux Commands
  • Linux Desktop
  • Linux Distros
  • Linux IDE
  • Linux Mint
  • Linux Talks
  • Lubuntu
  • LXC
  • Mail Server
  • Manjaro
  • MariaDB
  • MongoDB
  • Monitoring Tools
  • MySQL
  • Network
  • Networking Commands
  • NFS
  • Nginx
  • Nodejs
  • NTP
  • Open Source
  • OpenSUSE
  • Oracle Linux
  • Package Managers
  • Pentoo
  • PHP
  • Podman
  • Postfix Mail Server
  • PostgreSQL
  • Python
  • Questions
  • RedHat
  • Redis Server
  • Rocky Linux
  • Security
  • Shell Scripting
  • SQLite
  • SSH
  • Storage
  • Suse
  • Terminals
  • Text Editors
  • Top Tools
  • Torrent Clients
  • Tutorial
  • Ubuntu
  • Udemy Courses
  • Uncategorized
  • VirtualBox
  • Virtualization
  • VMware
  • VPN
  • VSCode Editor
  • Web Browsers
  • Web Design
  • Web Hosting
  • Web Servers
  • Webmin
  • Windows
  • Windows Subsystem
  • WordPress
  • Zabbix
  • Zentyal
  • Zorin OS
Visits
  • 0
  • 259
  • 614,631

DesignLinux.com © All rights reserved

Go to mobile version