0% found this document useful (0 votes)
19 views

How To Install Linux - UNIX - .Tar - GZ Tarball Files - NixCraft

Uploaded by

Trung Tuyen Lam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

How To Install Linux - UNIX - .Tar - GZ Tarball Files - NixCraft

Uploaded by

Trung Tuyen Lam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

29/07/2024, 18:36 How to install Linux / UNIX *.tar.

gz tarball files - nixCraft

How to install Linux / UNIX *.tar.gz tarball files


Author: Vivek Gite Last updated: June 26, 2024 253 comments

I
am new to Linux. However, a few days ago, I discovered lots of software distributed as a .tar.gz file. So
how do I install tar.gz files under Linux?

The tar.gz, also known as a tarball, is an archive format for electronic data and software. Most Linux
tarball contains source code for software. I recommend installing all binary packages with apt-get, rpm
and yum commands instead of the tarball method.

Tutorial details

Difficulty level Easy

Root
Yes
privileges

Requirements Linux or Unix terminal

Category Package Manager

OS AIX • AlmaLinux • Alpine • Arch • BSD • Debian • Fedora • FreeBSD • HP-


compatibility UX • Linux • macOS • Mint • NetBSD • OpenBSD • openSUSE • Pop!_OS • RHEL • Rocky • Stream • SUSE • Ubuntu • Unix • WSL

Est. reading
2 minutes
time

ADVERTISEMENT

How to install Linux / UNIX *.tar.gz tarball files

Tarballs are a group of files in one file. Tarball files have the extension such as .tar.gz, .tgz or .tar.bz2. Most open source
software use tarballs to distribute the program’s source code. Git is another popular method in which you need to clone
the remote repo and then run the command explained in step # 2. For example:

$ git clone https://url/repo.git


$ git clone https://github.com/Dr-Noob/cpufetch

Use the wget command or curl command to download the tarball. For example:

$ wget https://url/file.tar.gz

Let us see commands.

Step 1 – Uncompress tarball

To uncompress them, execute the following command(s) depending on the extension, run:

$ tar zxf file.tar.gz


$ tar zxf file.tgz
$ tar jxf file.tar.bz2
$ tar jxf file.tbz2

Now change the directory using the cd command:

https://www.cyberciti.biz/faq/install-tarballs/ 1/2
29/07/2024, 18:36 How to install Linux / UNIX *.tar.gz tarball files - nixCraft

$ ls
$ cd path-to-software-src/

Step 2 – Build and install software

Generally you need to type the following 3 commands for building and compiling software on Linux or Unix-like systems:

$ ./configure
$ make
# make install

Where,

The ./configure will configure the software to ensure your system has the necessary functionality and libraries to
successfully compile the package
The make will compile all the source files into executable binaries.
Finally, the make install will install the binaries and any supporting files into the appropriate locations.

In some cases you just need to type the following two commands (no need to type ./configure):

$ make
# make install

Step 3 – Read the INSTALL / README file

Use the ls command to list files:

$ ls -l

Each tarball comes with installation and build instructions. Open INSTALL or README file for more information:

$ vi INSTALL

OR

$ vi README.txt

That is all for now.

https://www.cyberciti.biz/faq/install-tarballs/ 2/2

You might also like