Method 2 : Using graphical archive manager

Step 1 : First of all locate the file that you want to extract. For this, open up your file explorer, which is the app you use to navigate through the file system. On Ubuntu this file system is Nautilus. To open it search for files in the application menu and click on the folder like icon.

Locate the compressed .gz file

Step 2 : Now, that we have located our files. We can go ahead and start with the actual extraction of the file. For this, right click on the file, this opens up a context menu. Now in this menu locate and click on the option that says “extract” to extract the gz file.

Click on extract from the right click menu

Step 3 : Now as we can notice a new uncompressed file will appear in the file explorer. Now you can just double click on the file to open it. A good thing about this method is that it will not remove the compressed file, after its done extracting the file. Therefore you will still have access to both the compressed and uncompressed version of the file after you are done extracting.

Extracted file is now visible in the file explorer

How to Unzip (Open) Gz File

If you have been using Linux for some time, you must have come across a “gz” file. Have you ever wondered, what is it and how do you actually open it?

Worry not, in this article, we deep dive into the details of gz file and help you overcome your doubts about it.

Table of Content

  • What is gz file?
  • How to open gz file
  • Method 1: Using the gzip command
  • Method 2 : Using graphical archive manager
  • Method 3 : Using gunzip command
  • Method 4 : Using tar command [ONLY for compression in the tar.gz format]

Similar Reads

What is gz file?

Remember the old compressed zip files, gz files are similar to that. gz is also a file format for creating compressed files using the GNU zip compression algorithm also known as gzip. A good thing about this approach is that gzip compression is lossless, hence, the data is not lost during compression and this makes it ideal for packaging software on Linux so that their sizes can be reduced for lower network loads, that too without any data loss. It uses the Lempel-Ziv encoding (LZ77) algorithm for compression....

How to open gz file

Now that we know what gz files are, let’s look into ways of unzipping or opening them. Since after all, it’s only after decompression that the files are of any use or not. Also since we are looking at gz files which are under the GNU umbrella, opening these files on Linux is really easy to do and with a lot of options to choose from. That said, even if you are on another system, you will still be able to open these files, just the methods will be different....

Method 1: Using the gzip command

Step 1 : Use they key combination Ctrl+Alt+T to open the terminal. The terminal is a command line interface that allows for more direct control over the system. You can also open it from the application menu if you so choose....

Method 2 : Using graphical archive manager

Step 1 : First of all locate the file that you want to extract. For this, open up your file explorer, which is the app you use to navigate through the file system. On Ubuntu this file system is Nautilus. To open it search for files in the application menu and click on the folder like icon....

Method 3 : Using gunzip command

Step 1 : Use the application menu to open the terminal, or use the shortcut Ctrl+Alt+T to do the same. This will open up a terminal window or in other words, a command line interface from where you can run commands and utilities on your system....

Method 4 : Using tar command [ONLY for compression in the tar.gz format]

If you have been on Linux for sometime you might have come across another file extension .tar.gz. This is a tarball, (here tar stands for tape archive) essentially it is a collection of files that have been combined into a single compressed file using the gzip compression algorithm used by normal gz. This overcomes the big limitation of standard gz, and allows for compression of entire folders....

Conclusion

As we have seen over the course of this article, xz files are nothing special. They are just a way of storing and compressing files. And while you’re on Linux, you don’t need to worry much. Most of the newer graphical distros like Ubuntu and Linux Mint come with built in tools to decompress files using a GUI. And even if you’re using a distro that does not have built in tools for it, you can just use the commands we discussed above.So next time you see a gz file or a tarball don’t panic, they are not a hassle. They are fun to use and easy to extract....