1. Home
  2. Linux

How to extract Tar GZ archives in Ubuntu [Guide]

Not all Linux programs come in DEB or RPM packages. Some programs are distributed to Linux users inside of Tar GZ archive files. These files are compressed and the user must manually extract the contents. 

A whole lot of new Ubuntu users do not understand how to extract Tar GZ archives. As a result, many users give up on Tar GZ archives. This guide will show you various ways you can extract Tar GZ archive files on Ubuntu. 

Extract Tar GZ archives in Ubuntu – Ubuntu file manager

If you have a Tar GZ archive that you need to extract in Ubuntu, the Ubuntu File Manager is probably the best way to go. It’s got a built-in feature that allows users to right-click on any archive and select the “Extract” button to extract the contents.

In this section of the guide, we’ll go over how you can use the Ubuntu file manager to extract tar archives. First, open up the Ubuntu file manager and use it to navigate the Tar GZ archive location you wish to extract.

Extract here

When you right-click on an archive in the Ubuntu file manager, you’ll see “Extract here.” This function allows you to quickly extract the contents of any archive, including a Tar GZ file, and place it in the folder you’re in, rather than having to specify exactly where to extract.

First, right-click on the Tar GZ archive in the Ubuntu file manager with the mouse to do this on your system. Once in the right-click menu, look for the option “Extract here,” and click on it with the mouse.

When you select the “Extract here” option, the Ubuntu file manager will not prompt you for any input. Instead, it will instantly extract the Tar GZ archive contents in the same folder as the Tar GZ archive. 

Extract to

If you wish to extract a Tar GZ archive contents on your Ubuntu system to a specific folder, rather than the same folder as the archive, you can use the “Extract to” function. 

The “Extract to” function allows Ubuntu users to specify, before archive extraction, exactly where the archive’s contents should go. So, if you want to place your Tar GZ archive contents in “Documents,” you can select “Documents,” and it’ll go there.

To use the “Extract to” function with the Ubuntu file manager, do the following. First, right-click on the Tar GZ archive within the Ubuntu file manager. Then, look through the right-click menu for “Extract to,” and select it with the mouse.

After selecting “Extract to,” a pop-up window will appear. In this pop-up window, locate the folder you wish to empty the Tar GZ archive contents to. Then, click the “Select” button.

Once you’ve selected the “Select” button, the Ubuntu file manager will extract your Tar GZ archive to the folder you’ve specified.

Extract Tar GZ archives in Ubuntu – Archive Manager

Another way to extract Tar GZ archives on Ubuntu is with the pre-installed Archive Manager tool. To start the extraction process, press the Win key on the keyboard to open up the Gnome Shell search box. 

Once the Gnome Shell search box is open, type in “Archive Manager.” Then, click on the app with the name “Archive Manager” in the search results.

When the Archive Manager application is open on the Ubuntu desktop, search for the menu on the right and click on it. Inside the menu, find the “Open” button, and select it.

After selecting the “Open” button in the menu, a file browser will appear. In the file browser, locate your Tar GZ archive. Once you’ve selected your Tar GZ archive, the Archive Manager will load it up into the UI.

To extract, find the “Extract” button, and click it to extract the contents of your Tar GZ archive.

Extract Tar GZ archives in Ubuntu – Terminal

A third way to extract Tar GZ archives in Ubuntu is with the terminal, using the tar command. The terminal extraction method is very versatile, especially if you prefer to use the command-line for most things on Ubuntu.

To start the extraction process, you will need to navigate the Tar GZ archive location on your PC. In this example, our Tar GZ archive is located in the “Documents” folder. Yours will differ.

cd ~/Documents

Once inside of the directory that has your Tar GZ archive, the extraction can begin. Using the tar xvf, extract your Tar GZ archive. Keep in mind that the contents will be extracted in the same folder as the archive.

tar xvf my-tar-gz-archive.tar.gz

If you’d like to specify where the contents are extracted, use the -C command-line switch. For example, to extract the Tar GZ archive to the “Downloads” folder, you’d enter:

tar xvf my-tar-gz-archive.tar.gz -C ~/Downloads

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.