TAR vs. TAR.GZ Information: What’s the Distinction?

If you're using a Linux computer, you may have noticed TAR and TAR.GZ files on a number of occasions. So how do they differ?

TAR archives are an integral part of a Linux ecosystem. All packages that you install on your computer are provided in the form of compressed archives. Some of them have the TAR file extension while other compressed archives use the TAR.GZ or TAR.BZ2 file format.

But are TAR and TAR.GZ files essentially the same? And if not, what is the difference between these two file types? You can find the answers to these questions in this post.

How does TAR.GZ differ from TAR?

Before creating and extracting compressed archive files, there are a few things you should know. Many users do not know the difference between a TAR file and a TAR.GZ file. For them both are a collection of files compressed using an algorithm to save space on the system.

But that's not entirely true. To know the main difference between a TAR and a TAR.GZ file, you need to understand the difference between archiving and compression. Archiving is the process of combining multiple files into a single common file. Compression, on the other hand, is the process by which a file is smaller than its actual size.

A tar file is what you would call an archive because it is just a collection of multiple files grouped together into a single file. And a GZ file is a compressed file that has been zipped using the gzip algorithm. Both the TAR and the GZ files can also exist independently of one another, as a simple archive and as a compressed file.

Related: What Is a GZ File and How to Extract It?

But when you combine them together they form a "compressed archive file" which is TAR.GZ. A tarball, when compressed using a compression algorithm, forms a compressed archive.

Working with compressed archives on Linux

Linux has several utilities for creating, extracting, and managing TAR.GZ files. While the tar and gzip utilities are often preinstalled in most distributions, users will have to manually install other command line archive managers such as 7-Zip.

7-Zip released its official Linux version not that long ago. The 7-Zip package is not available in official distribution repositories and you cannot install it on your system using the standard package manager. However, this does not mean that installing 7-Zip on a Linux machine is not possible at all.

7-Zip arrives on Linux: how to install it …

The popular file archiving utility 7-Zip has been released for the Linux operating system. How to install it.

Continue reading

About the author

Deepesh Sharma
(59 articles published)

Deepesh is Junior Editor for Linux at MUO. He has been writing informational content on the Internet for over 3 years. In his spare time he enjoys writing, listening to music and playing the guitar.

From Deepesh Sharma

Subscribe to our newsletter

Subscribe to our newsletter for tech tips, reviews, free e-books, and exclusive offers!

One more step …!

Please confirm your email address in the email we just sent you.

Leave a Reply

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