Searching and installing softwares.

Here we see how we can search for softwares on ubuntu. Ubuntu maintains a repository (a kind of huge database full of softwares) where almost everything you need (commonly) will be available.

Let’s get to it. ‘apt’ is your friend. Trust him and let him work for you. Rub the lamp for a while and viola! There comes ‘apt’ out of the lamp!

Anyway, how to search for a software? Just do the following:

apt-cache search SOFTWARE

Be sure to replace that ‘SOFTWARE’ with whatever you want to search for! Once you’ve typed that in, a long list will appear showing you the results matching your query. Let’s see an example. Suppose you want to install inkscape and don’t know what the software name exactly is, just do the following:

haris@lorien:~$ apt-cache search inkscape
inkscape – vector-based drawing program
create-resources – shared resources for use by creative applications
ink-generator – Inkscape extension to automatically generate files from a template
ttf-opendin – Open DIN font
ttf-rufscript – handwriting-based font for Latin characters

Ah! There it is at the top. Now how to install it you ask? Just follow the following!

sudo apt-get install SOFTWARE

You need to use the ‘sudo’ command for this. ‘apt’ will fetch all the dependencies for you and install your software for good!

Check it out. 🙂

2 thoughts on “Searching and installing softwares.

    • Hey Sonith,

      Read this till the end before actually trying out the steps.

      After downloading the tar.gz file, untar it by running

      tar -xvzf filename.tar.gz

      After untarring it, the best way is to go through the README.txt or INSTALL.txt which can be found under the /docs directory among the untarred files.
      However, assuming that the software you’re about to install are built with GNU’s autoconf and make tools, I’ll explain the steps below. (Meaning, in most of the cases the following steps will work.)

      1. Check to see of there is a script called ‘configure’ among the untarred files. If yes skip this step. Otherwise, do

      autoreconf –install

      2. This will generate the configure script for you and you will be able to find it among the files. Once ‘configure’ is there, run


      This will generate a file called the Makefile for you. However (A BIG HOWEVER), a Makefile will only be generated provided you have all the dependencies installed on your system. That is, the software you are about to install may depend on other software or libraries to work. Step 2 checks if these dependencies are met and will return an error if any of the dependencies are not met. When you see the error, you will have to install that software/library package in order for the configure script to execute successfully. If you are using Ubuntu/Debian based distros, you just have to apt-get install the softwares.

      3. After installing the dependencies and the successful completion of the configure script, a Makefile will be there among the files. Run


      This will compile the files of the software. (Note: If you are making any changes to the software, make recognizes that change and recompiles only that. It thus saves you a lot of time by not recompiling the entire thing once again.

      4. After the successful completion of make, run

      sudo make install

      This will install your softwares binary files and libraries under /usr/local.

      5. You are good to go. Just type the name of the software in the terminal and hit enter.

      IMPORTANT: The problem with the above approach is that (assuming you are using Debian/Ubuntu based distros) your package manager ‘apt’ doesn’t know that the software has been installed. As such, it might cause trouble if you use apt to install this software itself from the repository. The recommended way to install softwares from source is to install them into a non standard location. The changes you will have to do in the above steps in order to install the software into a non-standard location are explained below.

      1. Same step.
      2. Create a folder ‘temp’ (any name you want) somewhere in your home directory. For sake of explanation, I created a folder named ‘temp’ in my home folder. So its path will be /home/haris/temp. Now run

      ./configure –prefix=/home/haris/temp

      3. Same step.
      4. You ran this step with sudo earlier because /usr/local was a standard location and you needed administrative privileges in order to install binary/library files there. But now, since we have given a non-standard location, just run

      make install

      This will install the binary files of your software (the files that is to be executed in order to launch the program) in the specified location. In this case, under /home/haris/temp/bin.

      5. You’re not good to go. In order to run the program, you need to go into the directory containing the binary files and run it from there by typing the name of the software. (This is because linux searches for the executables in standard locations such as /bin, /usr/bin, etc.) However, if you want the software to run from the prompt no matter in which directory you are, here is way for that.

      6. The locations linux will search for the executables will be given in a variable called PATH. Try

      echo $PATH

      in your terminal and you can see the locations.

      7. What we need to do is to add the path of our installed software to the PATH variable. To do this, open up the file named .bashrc from your home folder.

      sudo gedit ~/.bashrc

      8. Add the following to the end of that file (in your case, give the path of the ‘bin’ folder of the installed software). In my case,

      export PATH

      9. Save and exit. Restart your terminal and try typing the name of the software from anywhere you want. It will launch.

      NOTE: Sometimes the Makefile will be there by default among the untarred files. In that case just do step 2 and 3.

      Good luck!

Hey! What do you think? Share your thoughts. :)

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s