How to Extract or Unzip tar.gz Files in Linux

how to open tar.gz

The first is the -k option, and the other uses the -c option to output the compressed file to a different file, preserving the original. You can just as easily unzip the resulting .tar.gz file with the decompress (-d) option. Thankfully, you don’t need to be a 1960s computer technician to use and extract .tar files – nor do modern .tar files even have anything to do with old computers. The easiest method on all platforms would be to use an online extraction tool. Such a utility works across platforms anywhere, saving you the hassle of figuring out the right way to extract a tar.gz file. In most platforms, the chances are that you already possess the right application to extract and open TGZ files.

how to open tar.gz

If you plan to distribute and store .tar.gz files on your website, Kinsta’s managed hosting services can help make the most of your space. To open https://www.topbitcoinnews.org/ such a package, you need to decompress the gzip and extract the resulting tarball. Some utilities can open TGZ files in one step, others in two.

A user-friendly way to extract files from a .tar.gz archive is via a Graphical User Interface (GUI). A GUI is more suitable for beginners than a command-line tool. It’s often useful to list the contents of a .tar.gz file without having to unzip the entire archive. The tar command also provides support for extracting only specific files or directories from a .tar.gz file. Simply add a space-separated list of the files you want to extract.

Alternatively, select Extract files to pick where to extract the files. It is assumed that you are extracting a tarball created on another system. https://www.coinbreakingnews.info/ We are skipping some arguments usually necessary to preserve permissions, which on Windows 10 are not required to access the files.

What’s The Difference Between .tar and .tar.gz Files?

Where .zip files consist of many individually compressed files, .tar files are compressed as a single package, leaving its files uncompressed. In other words, .zip files are a collection of compressed files, while .tar files are a compressed collection of files. However, Windows 10 includes native support for tar files, and you can use Command Prompt to extract these files. Or you can even use the Windows Subsystem for Linux (WSL) that includes native support for Ubuntu, Fedora, SUSE, and many other distros.

This error occurs if you try to decompress a file without specifying a decompression utility, specifically -z for gzip. In this example, the user tried to extract the file titled “FILE” from filename.tar.gz. However, tar was unable to find FILE within .tar.gz, meaning that the user either misspelled the name or that the file simply doesn’t exist in filename.tar.gz.

What command do I need to unzip/extract a .tar.gz file?

While extracting a .tar.gz file isn’t quite as easy as unzipping a .zip, it’s still pretty straightforward. Instead of downloading a specific application to your computer or leveraging its built-in abilities, you can extract your tar.gz archive using an online app. Many websites allow you to extract all kinds of compressed files, including ZIP and TAR files. A file using .tar.gz format is a file that has been created using the Unix-based archival application tar and then compressed using the gzip compression. These files are often referred to as “tarballs.” While you can find them with a double extension (.tar.gz), the extension can also be shortened to .tgz or .gz. Since .tar.gz compresses multiple files all at once, it can take advantage of similarities between individual files to save on space.

  1. Any remotely modern version of tar should auto-detect that the archive is gzipped, and add “z” for you.
  2. You can also add the verbose output option (-v) to provide detailed listings, including dates, securities/permissions, and more.
  3. However, there are also many third-party tools you can install for a more user-friendly experience.
  4. A “.tar” file is a collection of files compressed into a single file or archive.
  5. Unlike Windows’ convenient graphical user interface (GUI) for unzipping .zip files, you’ll need to use the tar utility through the command line.

As we’ll see in the next section, .tar comes with a few extra features that make it the better compression format for certain files and applications. Here you should replace the filename with the actual name of the file in question. You also need to be in the directory containing the tar.gz file, like with most terminal commands in Linux. If you are into coding or just downloading a package from Github, you may come across the TAR.GZ file extension. Popular with Linux users, the TAR.GZ format (TGZ) is often used to package collections of files into a single downloadable.

Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 20 years of combined experience in technology. You can follow him on X (Twitter), YouTube, https://www.bitcoin-mining.biz/ LinkedIn and About.me. In this guide, you will learn how to extract or unzip .tar.gz files in Linux. To access the Windows command line, search for “command prompt” or “cmd” in the search bar.

Extract .tar.gz, .tgz, .gz tarballs using tar on Windows 10

A “.tar” file is a collection of files compressed into a single file or archive. Short for “Tape ARchive,” the name “TAR” is a throwback to when files were stored on magnetic tape drives. Mac users can also use this command to extract their tar.gz files, though they also have access to a GUI-based method we will discuss in the next section. Knowing how to unzip a .tar.gz file allows users to extract and access the archives’ contents efficiently. You can open most .tar.gz files using the tar command built in to Linux, macOS, and Windows 10.

Extract .tar.gz, .tgz, .gz tarballs using tar on Linux on Windows 10

If you’re not comfortable with the terminal or command line, third-party tools such as 7-Zip offer a more user-friendly alternative. It’s easy to get confused when navigating between .tar, .tar.gz, and .gz – not to mention zipping and unzipping them. Here are a few frequently asked questions we commonly hear from users working with .tar.gz files.

Since Windows doesn’t natively support tar.gz files, you need a third-party tool to open them for you. Most file extraction applications like 7-Zip or WinZip will get the job done. Like the tar utility, gzip also allows you to zip and unzip multiple files or entire directories at a time. Note that this command will throw an error unless you specify the exact filename listed in the .tar file. As we’ll cover more in the next section, you can verify file names by listing contents with the tar -tf filename.tar.gz command. But with .zip being the easier of the two to use, why use .tar in the first place?

Right-click the first result and select the “Run as administrator” option. Starting from Windows 10 build 17063, tar and curl are supported, therefore it is possible to unzip a .tar.gz file in one step by using tar command, as below. The terminal command used in Linux works here just fine if you are comfortable with terminal commands. But the question is, how exactly do you open TGZ files? Alternatively, select one of the offered locations or set one up by clicking the Extract files… option.