HowTo: Open a Tar.gz File In Linux / Unix

I‘ve received a file called date.tar.gz. How do I open/extract/unpack a tar.gz file on Linux or Unix like operating systems using shell prompt? A .tar.gz (also .tgz) file is nothing but an archive. It is a file that acts as a container for other files. An archive can contain many files, folders, and subfolders, usually in compressed form using gzip or bzip2 program on Unix like operating systems.

Adblock detected 😱

My website is made possible by displaying online advertisements to my visitors. I get it! Ads are annoying but they help keep this website running. It is hard to keep the site running and producing new content when so many people block ads. Please consider donating money to the nixCraft via PayPal/Bitcoin, or become a supporter using Patreon.

Say hi to tar command line tool

You need to use the tar command which can create and manipulate archive files in .tar.gz under Unix like operating systems. Open a command-line terminal (select Applications > Accessories > Terminal), and then type the following to open and extract a .tar.gz file:

file-roller: GUI tool

You can use the Archive Manager GUI application to create, view, modify, or unpack an archive. You can start Archive Manager by clicking onApplications menu > Choose AccessoriesÂ > Archive ManagerFig.01: Gnome Archive Manager To open an archive:

Choose File.

Open to display the Open dialog.

Select the archive that you want to open.

Click Open.

Fig.02: Linux: Open Files With an Archive Manager Once opened you can view or extract files. To select all files in an archive, choose EditÂ > Select All or press Ctrl+A. To extract files from an open archive: Select the files that you want to extract.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Your support makes a big difference:

I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft takes a lot of my time and hard work to produce. If everyone who reads nixCraft, who likes it, helps fund it, my future would be more secure. You can donate as little as $1 to support nixCraft:

Yawn. This is why linux after all these years is a waste of space. In 10 years you still haven’t managed to create a double click installer. Common fanboys hit me with your arrogant linux attitude. I don’t want to hear your explanations no one wants tar files no one wants to use a terminal and until you have a double click install with zip, rar and 7z support i will always call linux rubbish. see yah.

Actually it is supported and additional archieve formats can be added with ease to the linux system; many users prefer the terminal, why you may ask because it is power which cannot be met by any GUI tool which is the case on almost every operating system. Also download a .deb file and double-click it; seriously I don’t think you’ve ever had the privillage of using a unix system or linux system for that matter.

Get a life or get a job as I see there is absolutely no reason to discourage new users simply because you are ignorant or lack the skills required to have an even primitive knowledge of the same system that runs most of world’s webservers and 99% of the world’s fastest supercomputers.

So we’re all a bunch of fanboys; I personally have a custom kernel and my system runs even cooler under linux than Windows. I’ve logged hundreds of hours in Windows troubleshooting issues ranging from rootkits to the occassional user whom fails to understand that doubleclicking that exe file will start the installer (same thing as double-clicking a .deb file on a debian/debian-based system).

By the time I was 18 I was an IT whom had worked on databases worth millions. If you honestly expect me to believe for even a moment that you have even experience once so ever on these systems then you are dumber than I first thought. I’ve worked alongside software engineers and systems analysts and have served as an advisor for computer systems all of these were Windows.

Also there was a study done which showed that linux (study used Ubuntu) is more user-friendly than Windows. Now if you want to start an debate on macs I’ll have to remind you that macs are unix-based and after it took 6 months for Apple to patch only one security threat when the linux kernel can be patched in hours.

It’s because of idiots like you with that mindset faded away into obscurity because they refused to learn new and emerging technologies….much like the ex-mainframer’s I used to work with at one of my prior places of employment (Chubb & Son’s, Inc. in New Jersey) who refused to want to learn Unix or any other operating system because they believed nothing could be superior to Big Iron, as mainframes are called…..after the datacenter was outsourced many of them could not find employment because of their outdated 70’s experience and technical skills and had to take jobs at Lowes, Home Depot, WalMart, KMart, and other non-technology companies….WHY???? Because they failed to stay current!! You sound just like that group of losers who had nothing to do but bash this system and that system in favor of Big Iron without thinking ahead to where the future may take them…..