In Unix, how do I install a program distributed in *.tar format?
A program that is in *.tar format has been
archived using the Unix tar command. An archived
file is one file that contains many files. To install a program that
is in *.tar format, you must first separate, or unpack,
the individual files. To do so, at the prompt, enter the following
command:
Replace filename with the name of the program you are
installing.
In most cases this will create a directory called
filename (the name of your program) which includes all of
the source files for the program. To go into this directory, enter
the following command, replacing filename with the name
of your program directory:
In many cases, files distributed in *.tar format are
also compressed, in which case the files must first be decompressed.
For instructions, see the following:
- If your file contains a
.tar.gzor.tgzextension, see In Unix, what is tar, and how do I use it?
- If your file contains a
.tar.Zextension, see In Unix, how can I uncompress *.Z or *.tar.Z files?
Most free Unix programs are distributed as source files. These are
text files containing the program file. In most cases you will need
to compile the program for the system on which you are installing the
program. Most free Unix programs will come with a text file called
README or INSTALL with specific
instructions. Usually you will need to complete the following steps:
-
Configure the software: Some programs come with a
shell script called
configure. This shell script will scan your computer to determine the location of files necessary for the program to work. If you are installing the program on a shared Unix system, you will want to install the files in your home directory. To do so, enter the following command: ./configure --prefix=$HOMEFor programs that don't have a
configurescript, you may need to edit a file called a Makefile in order to install the software. TheREADMEorINSTALLfile will explain how to do this. -
Compile the program: Compiling the program
creates an executable file. To compile the program for most Unix
packages, from the program's directory, enter
make.
-
Install the program: In some cases you may be
able to install the program in your home directory by entering the
command:
make install
For other packages you may need to move the executable files to your home directory. To do so, use the following command:
mv filename ~/binReplace
filenamewith the name of the executable file you are moving.
At Indiana University, to get support for personal or departmental Linux or Unix systems, see At IU, how do I get support for Linux or Unix?
Also see:
- What are compressed or archived files, and how do I open them?
- In Unix, what is tar, and how do I use it?
- At IU, in Unix, how can I make better use of my disk quota?
Last modified on May 13, 2009.






