How to Extract a Tarball on Linux

If you downloaded a file or package that ends with .tar or .tar.gz, you can extract the files inside using the tar command. A TAR file, also known as a tarball, is an archive of files bundled into a single file that's easy to unpack.  You won't need to install extra software, as Ubuntu, Debian, and all other Linux versions have the tar utility preinstalled. This minHour article will show you how to extract a TAR file at the Linux command line, and how to find and open the files you've extracted.

Steps

Getting Started.

First, you need to get a tar file from the internet. For example, something like SuperTuxKart.

Opening the terminal.

Now, once the tarball is finished downloading, open your terminal, on each operating system it is slightly different. But the universal way of getting to the terminal is by pressing Ctrl+Alt+T.

Extracting the tarball.

After the terminal launches, type in this command: “cd /home/[user]/Downloads/” Then, type in: “sudo tar zvxf supertuxkart.tar.gz”. Sudo is to give your command the root privileges (highest possible). Tar is the program to extract a tarball. The “v” option here is optional as it only tells the program to give verbose (on screen details of what it is doing).The “f” option should always be last, and followed by a space and then the name of the file you wish to extract.

Open the folder.

After the process finishes, open your file viewer of choice, and direct to the Downloads folder. There should be a new folder in there that is named after the package (In this case, SuperTuxKart) There won’t be tar.gx at the end.

Installing the package.

Open that folder, and find any .txt or readable files named install or README. You will have to read both named documents to correctly install the package. These files should include the documentation on how to use the application/commands and any necessary programs to install as well.

All done!

Once you have completed all of the steps in the install and/or the README file, the application should be ready to use.

Tips

  • When downloading an application, install the latest version of it, you could never know, it could have massive bug fixes, security fixes, and maybe even a little cake inside!

Warnings

  • When downloading an application make sure you download the correct binary type, these usually show up as amd64 and i386. If you don’t know already, amd64 is for 64-bit systems, and i386 is for 32-bit systems. Make sure you don’t run a amd64 binary on a 32-bit system. But it is completely fine to use a i386 binary on a 64-bit system.

Leave a Comment