One of the main reasons why some people may need to use a terminal window is to compile a program which they downloaded from the web. Compiling is a process that takes text source code and converts it into a binary program, which can only run on the specific processor where it was compiled.
All such programs include intructions on how to compile them - these instructions are found in text files called "INSTALL", "README" or some similar name. Here I will describe one of the commonest routines used.
First of all, assume that the file we downloaded was called "MyProgram-1.2.3.tgz". Since this file is an archive, like a WinZip file, we have to extract its contents. This is done using the tar command:
tar -xvzf MyProgram-1.2.3.tgz
The options given instruct tar to extract (x) and verbose (v) the zipped contents (z) of an archive file (f) with the specified name. Tar will extract the contents of the archive and display what it is doing.
Next, we have to cd to the newly created directory, which generally has the same name as the archive, minus the ".tgz".
cd MyProgram-1.2.3
Usually, the next step is to run the "configure" script. This examines your system and produces a compilation and installation script that is ideally suited for your configuration. Another task done at this stage is to check whether you have all prerequisite software installed. The "configure" command produces many lines of output. Unless it ends with an error, these can be ignored.
./configure
When the "configure" script writes the recipe, the "make" command takes the ingredients and bakes the cake. This is often done in two steps. First, you type in "make" to generate the binary program, then you type "make install" to place these binary programs in their proper location on your computer. This last step must be performed using the "root" user, since it requires permission to place files in system areas. You can switch to the root user by using the "su" command.
make su make install exit
If no errors were reported, you’re ready.