0

It seems like a lot of people don't know this essential skill of Linux--so it's time to learn:)

Trevor Gross
  • 398
  • 3
  • 9

1 Answers1

0

Many of the less-popular applications for Linux systems don't ship as deb or rpm packages; in face, most ship as source files, usually in a tar archive. The first thing to do if you want to install one of these programs is to navigate to the directory where you downloaded the archive using the cd command. Once there, extract the archive with:

tar -xfv filename.tar.x

where filename.tar.x is the name of the downloaded archive. The -x option indicates that you want to extract the archive and -f indicates that you want to unarchive a file. -v tells tar that you want a verbose list of the files it extracts; this command could be run without it, you just wouldn't get a list of all the files that are unarchived.

Next you need to run the configuration script, for most applications. Some applications have special instructions, so you should skim the README file first, which you can do by navigating to the extracted directory and typing ls, which will list the files in the directory. Assuming that the readme file is named README as most are, just type nano README to read it (ctrl+x to exit.)

To run the configuration scripts, first navigate to the extracted directory (if not already there) and type ls to view a list of files. You should see a file named configure or config, which may or may not have a file extension. Type:

./configurefile.name

where configurefile.name is the name of the file with its extension, if present. This will usually just be ./configure. Depending on your distro, you may need a sudo or a su or a # before the ./, if you get a permissions error. The configure script will check to make sure that your computer is able to support the application (dependencies, hardware requirements, etc) and then, assuming that all criteria are met, will create a makefile.

Up next we have to compile the source code presented in the archive. You can do so by running

make

with a sudo or su if applicable. This will find the makefile created by the configure script, giving it the ok to compile the application. This step can be pretty lengthy, depending on the software.

The last step is to install our compiled application. This is done with the command

make install

again using superuser if needed. After this step is complete, you can run the application and delete its files (the archive and the extracted directory.) Congratulations!

If you just want the quick way that works for most applications (not all), extract your file using tar -xfv filename.tar.x, switch to its extracted directory, and paste this into your terminal:

sudo ./configure
sudo make
sudo make install

This assumes you are using Ubuntu of course. If you aren't, you shouldn't need this guide. Good luck!

Trevor Gross
  • 398
  • 3
  • 9