How do I install software in Linux?

The easy way: Software Center (etc)

Ubuntu's Software Centre

Ubuntu Software Centre shows how easy it is to download and install software in Linux.

There are many different distributions (flavours) of Linux, as demonstrated in Chapter 3: Choosing a distribution. Each distribution of Linux handles the installation of software slightly differently, however, they all use one of three main ‘packaging’ types, so they rarely vary in drastic ways.

If you use Ubuntu, you will likely prefer the Ubuntu Software Center. It shows you which software you have installed on your Ubuntu PC, as well as all of the software titles available from Ubuntu.  It even recommends software that you might like, based on the software you have previously downloaded. Almost all the other Linux distributions all have their equivalents to the software center and they work in almost the same way.

Installing the software in the Ubuntu Software Center is as easy as clicking on the title you are interested in and tapping ‘Install’. The rest is done for you, and the application is available from the Ubuntu Launcher (that brown circle icon up at the top left-hand side of the screen).

Video: How to install software using the Gnome-software tool:

The rest of this chapter talks about more advanced topics of software installation, including how to install software utilising traditional software packaging methods such as apt-get, synaptic package manager and YUM.

Installing .deb (Debian packages) and using apt-get

debThe Debian package management system is a very well made software packaging model. It has similarities with the Red Hat system (RPM), however, when DEB packages are combined with the APT tool, both the act of obtaining software, and issues with dependent software are almost completely removed.

The DEB/APT system is highly popular, and is found on many systems other than Debian, including the Ubuntu, Linux Mint and more.

These are the main parts to the DEB system:

  • dpkg – A command line program with which you can install .DEB packages. This is the most basic (and most difficult way to install debian packages)
  • apt-get – An easy-to-use command line tool that offers a simple way to install packages, and unlike dpkg, does not work with the .deb package, but uses a file found in /etc/apt/sources.list to obtain the relevant .deb file from the net.
  • dselect – A text-based menu driven interface that acts as more than just a frontend to dpkg. Allows for installation and removal of packages
  • Aptitude – An ncurses terminal based front end to APT. It’s popular for it’s user friendly interface and highly descriptive nature.
  • Synaptic or Adept, or even the Software Center – The graphical frontend tools that provide an easy to use interface to apt-get. They make installing software easier as you don’t have to remember any commands, which most new users will feel more comfortable with.

Now that you know what the main Debian DEB tools are, we’ll step through installing a Debian package first using the Synaptic package manager, which is the default tool for Debian Linux, and then we will briefly cover installation at the command-line shell:

Installing software with the Synaptic Package Manager:

synaptic package manager

Synaptic Package Manager. Click thumbnail to expand

To start up Synaptic, click on the System menu at the top left of the desktop menu.

Then Click on Administration.

Finally, Click ‘Synaptic Package Manager’

Once you type your administrator password (which is the same password as the main user of the machine), you will shortly be presented with a screen similar to the one on the left.

Amongst the many options you see, there is a large list on the left hand side of the window.

This list contains all sorts of different categories of software. If you don’t know what you are looking for, start here!

Searching for packages in synaptic

Searching for packages in synaptic

By clicking on the Search button at the right hand side of the toolbar, it is possible to type in the name of a program you know the name of.

Note I am typing ‘kdegames’ here, because I know that I want the software package entitled kdegames.

By pressing the search button in the last step, I have now been shown the package ‘kdegames’ as well as a description, and version information.

synaptic-guide3If you are sure you want to install this title, then right click on it. The menu on the right will appear. By choosing ‘Mark for Installation’, the software ‘kdegames’ will be chosen for installation, when you apply these changes.

The example of ‘kdegames’ was specifically chosen because it is an example of software that has dependencies on other software (it needs other software titles to be installed for it to work). Synaptic/APT is showing you this synaptic-guide4fact and is conveniently telling you that it will also download the extra software shown in the menu to the left to ‘satisfy’ these dependencies.

You should click ‘Mark’, in order to continue.

One you click ‘Mark’, Synaptic will take you back to the main screen so that you may choose more software to install, if you wish.

If you are ready to install the software you chose earlier, click the ‘Apply’ button.

synaptic-guide5Synaptic gives you a warning message, telling you that new packages are going to be installed. By clicking on the Arrow beside ‘To be Installed’, you can see which ones.

If you are happy with this, click Apply.

Finally, the Synaptic Package Manager goes out to the Net, or perhaps requests a CD (if the data is to be found on the installation CD of your

The final step in downloading and installing software using the Synaptic Package Manager

The final step in downloading and installing software using the Synaptic Package Manager

Linux distro), and then installs the software onto your system.

Once the software is installed, you can generally use it directly from the ‘Applications’ menu. If you want to find out where the software was installed to, using Synaptic again, locate the software you just installed and right click it, view the Properties, and click on ‘Installed Files’.

If you would like to see a video guide on how to install software in Linux, using various methods, see our video tutorial here.

Installing software using APT-GET at the command line

Installing a deb package through apt-get is quick and is as simple as running the following command at the root Linux prompt (for example):

$ sudo apt-get install firefox

(you will need to input your password)

That example would install the most recent version of the program ‘firefox’. Apt would also tell you that it needs to download some other software (dependencies) in order for ‘firefox’ to run. A few other commands for Apt you’ll need are:

apt-get update

Updates the APT source information, to tell it about any new software in the APT repositories.

apt-get upgrade

Upgrades any old software on your machine to the latest versions automatically.

apt-get dist-upgrade

Upgrades the distribution to the latest available version of the distribution.

apt-get remove [software]

Removes [software] from your system, and any non-required dependencies.

Installing .DEB packages at the command-line shell:

Firstly, download the .deb package and pop it into any folder on your system, then simply install it by running the following command using the terminal:

$sudo dpkg --install package-name.deb

That should be the package installed, although again, there are dependencies to think about, and as with RPMs, make a note of any dependency errors, download the appropriate DEB package(s) to meet the dependenc(ies) and try again.

Installing Software on Red Hat based systems

RPM LogoRed Hat, one of Linux’s first distributors came up with a neat solution to the problems .tar.gz files and compiling has for the normal user. They pre-package the the file, zip it up and make it do all the hard installation work for you. This system is called RPM and it’s the standard software installation method for a lot of Linux distributions today, such as Red Hat, Fedora, SuSE and Mandriva.

YUM is easier and better:

YUM is a system much like Debian’s APT, but for Fedora and other Red Hat/RPM based distributions. It makes dependency problems far less likely for Fedora users.

Installing an software packages through YUM can be done by the following steps using the Terminal application:

$sudo yum install firefox

Note that you do not need to specify the version of software you are installing. YUM goes out to the Internet and automatically pulls down the latest version it can find of ‘firefox’, and installs it for you, along with any other software you may need, in order to run ‘firefox’.

What if I don’t want to type commands in to install software via YUM?

Then use the graphical program, Yum Extender (or similar)!

How do you install it, I hear you ask?

$sudo yum install yumex

Now you can access Yum Extender in the “red hat” menu, under “System Tools.”

For further information on YUM, see This page

How to install RPM files (red hat packages)

If you are unsure if you have an RPM system or you just want to check what version of RPM you are using, then try typing the following at the Linux terminal:

$ rpm -q rpm
You should get a similar answer to this:

If you get something like ‘command not found’, then it sounds like you don’t have RPM installed, you may be using a Linux distribution that does not use RPM natively, for example, Debian, Ubuntu, Gentoo, Slackware, Mepis or Xandros have a look at the DEB or TGZ sections of this page.

It’s important that if you go to download an RPM from the net, always try to get one that was packaged by the vendor of your distribution.

For example, if you go to the web and search for an RPM package called ‘firefox’, and you get 3 RPMs back: One from Red Hat, one from Mandriva and one from SuSE. If you have a Mandriva Linux distribution on your PC, make sure you use the Mandriva one.

The reason for this is all down to fitting into your system configuration structure and things called libraries, which vary from distro to distro.

How to install the package

Okay, let’s presume that you have an RPM file ready to install called netscape-4.76-3.i386.rpm

You can install it in the following ways:

At the terminal/console:

sudo rpm -Uvh netscape-4.76-3.i386.rpm

Preparing [###################] 100%
Installing [###################] 100%

The options -Uvh stand for the following:

U – Upgrade package if already installed, or install if not installed
v – Be verbose about the installation
h – show hash symbols to indicate progress of installation

Installing .tar.gz. files (tarballs)

tar.gz icon.Tar.gz files, or, Tarballs stand for  tape archive and are the Unix equivalent of zip files for the Windows world. They can contain any files, but are often used to package up source code for programs.

Tarballs come packaged in five main flavours:

.tar  (standard tar archive with no compression.)

.tar.gz, .tgz (standard gzip compressed tar archive. same as .tar.gz.)

.tar.bz2 (tar archive compressed with extra compression tool, bzip2)

.bin.tar, .bin.tar.gz or .bin.tgz (less common tar archive that contains binary files rather than source).

Most of the time, you will be dealing with .tar.gz files.

Here’s how to extract (unzip) a .tar.gz file in two different ways:

At the Console:

$ cd /directory_that_the_tar_file_is_in
$ tar zxvf tarfile.tar.gz

To explain the latter command, tar decompresses the gzipped file (with the z flag, which is short for gz, or gzip), x means to extract, v is for verbose (so you can see what’s happening as it extracts) and f means extract the following file (in this case tarfile.tar.gz). Remember that tar was originally used for extracting archives from tapes, back in the old days, so by default it expects the standard input to be a streaming tape archive.

To extract a tar archive In Gnome or KDE (Graphical Desktop):

Right click on the icon for the appropriate tar file in your file manager.

Choose Extract (or in KDE, choose Open with Archiver).

Extract with the tar file with the relevant archiver program.

Okay, now you’ve extracted it you have to either:

a) Compile the source code you just extracted

b) Run the installer script which is part of the files you extracted

So, how do you distinguish whether you have just extracted a tar file with source code in it, or whether it’s a binary, with an installer in it?

Usually, the contents of the .tar.gz file will help you out here – A file containing source code, will often contain a file called ‘Makefile’ somewhere in the first folder within the extracted volume. This file is used to compile, or, make, the software.

A tar file which does not contain source code mainly holds a binary installer file in it, the filename of the installer usually ends in .sh or .pl.

For example, the program VMWare, contains a program called in the extracted root folder.

To run the file, you usually need to give yourself ‘permission’ to run it:

sudo chmod 755 (changes permissions on the file so that it can be read, write and run- executed)

sudo ./ (runs the installer)

If you found a ‘Makefile’, then you need to compile the source code. Here’s how to do it:

Most of the time, you will need to use the terminal to compile source, so use an xterm/console/terminal and go into the directory that has been made by the package, eg:

$ cd /directory_that_the_tar_file_is_in

$ ls -l
Total 302

-rwxr–r– 1 user group 2907 May 21 17:15 mytarfile.tar
-rwxr–r– 1 user group 0015 May 21 17:15 newdir/

$ cd newdir/

at this point, make sure you read the INSTALL file. You’ll find that almost every tarball that you download (especially GNU software) has at least a file called INSTALL, COPYING, README and CHANGES

Most of the time the INSTALL file says the same thing, it’s a generic process for installing tarballs, but if a program requires to be compiled in a special way, you’ll find out in either INSTALL or README. If it’s helpful, it will tell you the names and websites of any other software you will require to download in order to install this software. These other pieces of software required are called ‘dependencies’.

If you were installing a generic program, extracted from a tarball and presuming that we just changed into our directory, as above, we could do the following to compile the program:

$ ./configure

(Take good notes here for any configure errors)

$ make

(Take good notes here for any compile errors)

$ make install

(Take good notes here for any compile errors)

$ make clean

(this cleans up after a sucessfull compile)

Why compiling is a pain in the ass (for most people), and the problems you might have.

The above procedure doesn’t sound too difficult, and in theory, it shouldln’t be. But it dosen’t always work.

Most of the time this is because of dependencies on other programs, you need other software (usually programming libraries) to be installed first, in order to compile this software.

Picture this scenario: You attempt to install tar.gzipped game called xtux.

The ./configure bombs, and you noticed on the web site of xtux, and also from the output of the ./configure something about SDL. You’re not quite sure what it is, but you go onto a site like google anyways and type in SDL.

You find out that SDL is infact a popular graphics library for X and that it’s necessary for xtux.

You download SDL-1.2.3.tar.gz from the SDL website and install that tarball. It installs fine, so you try installing xtux once more. It still bombs out, but this time it gives you a different message: could not find Qt equal or greater than 1.3 on a ./configure.

You check your system for QT version 1.3 or greater. You have 1.3.4 so you should be fine. Why is this error coming up? Well, it’s probably because Qt (which is another graphics / programming toolkit) is installed, but is not in the folder that ./configure is looking in. You can edit ./configure yourself to see if there is anything you can do to amend the situation yourself, or try removing Qt, and installing another instance of it from another source.

I find that RPM based distros often put stuff like Qt in places that a normal tarball dosen’t, so that’s often the reason for these compile problems, make sure that if you have installed the normal version of an RPM (binary version), that you also install it’s accompanying -dev RPM if you wish to compile .tgz based source against it. By this I mean:

Make sure you have installed qt.i386.rpm and qt-dev.i386.rpm if you are compiling something that relies on QT, as the -dev package will provide the qt source code to the source program you are installing.

Dealing with your files and programs

If you’ve installed your tarball, RPM or DEB package and you want to run it, or perhaps you are interested in knowing more about the Linux file system including dealing with permissions, have a look at the tutorial on ‘managing my files‘.

5 Comments on "How do I install software in Linux?"

  1. I still don’t get it

  2. Visible Spirit | April 9, 2017 at 1:43 am | Reply

    @ Alistair Ross: assuming your the author as I see you replying to most questions etc…
    …please don’t take my commentary personal. This is not an attack, insult, or criticism. Merely my opinion and suggestions. Read on…

    As a former (and returning) Linux user, the article starts out extremely simple, well written, and interest grabbing. However, begging with chapter 5 things become a little daunting for the uninitiated, yet do-able with your help for the beginner/n00b ;-). At the end/bottom of chapter 5 there is no link to go to chapter 6 as expected. Likewise at the end/bottom of chapter 6 to go to chapter 7 (although it is at the top, consistency is expected and should be at the bottom as well on each chapter page). Chapter 7 does have the link for chapter 8 at the end/bottom, as expected.

    Regarding Chapter 6: How do I get software for Linux?…
    1) I suggest you move ” 6.5 Obtaining the software that came with your distribution ” to ” 6.2 “,
    2) change the following section number designations respectively,
    3) add a line space above ” 6.7 Advanced Topic: Other ways of getting software ”
    4) and remove the number designation 6.7 altogether, making it a simple sub-header defining the following text/material as the sub-title suggests — (an) “Advanced Topic: Other ways of getting software” .
    _I agree with Tony Hawke stating “” After reading chapters 1-5 I was being convinced to adopt Linux; then I read chapter 6 and was completely baffled. It is this kind of geeky technicalities that turns people off Linux. Why does loading software look so complex? “”.

    It’s overkill for a newbie and even a turn-off / turning point of interest compared to the reading up to that point. It’s more for the intermediate skilled technical Linux types – gear-heads if you will. Good reading, but too much for the n00b. Why I suggest #’s 3 & 4 respectively above to clarify/signify it’s not necessary knowledge or procedure to use and enjoy today’s top ranking Linux OS’s in general. Most have easy user friendly app stores / repositories that are simple point-n-click for all ones needs, right down to system drivers and the like. No more hunt and seek at third party websites such as is necessary in Windows etc. Linux IS easier and simpler than the competition to use and enjoy; isn’t that the point? Linux “just works”! Unlike the competitions constant maintenance and broken frustrations after such updates, or the lack of support for your favorite application to keep up with the constant changes brought about by “patch Tuesday”, or worse.

    Regarding Chapter 7: How do I install software?…
    1) The subtitle “7.1 The easy way: Ubuntu Software Center etc” is not ‘bold’ as the remaining subtitles are and does not stand out to grab the attention it infers, signifying it’s importance stressing ‘the simplicity’ of software installation via Ubuntu’s Software Center (App Store if you will) and other Linux distro’s app stores like it. A key and necessary point for newbies; as this article is intended for and directed at them!
    2) I suggest you put a line or separator of sorts above the last sentence in the first section which reads, “The rest of this chapter talks about how to install software utilising(<-typo btw; should be z, not s) traditional…etc etc" (or bold it in smaller text?) to emphasize that further reading is more on the technical/geek side of the fence, Particularly for newbies reading this; again, your target audience. The talk of compression, compiling, and command-line use is too technical for the average inexperienced n00b. This is very confusing from their perspective, and down right scary as hell! Even I was a little daunted and confused regarding the direction/introduction of the easy and use of Linux for a newbie; ..and I'm an analytical technical type!

    Looking at it from a newbies perspective, I myself would've been turned off and went WTF?!? However, thanks to my previous experience with Linux, I understood the jist of it and read on. That isn't saying much regarding my experience, but enough such that I wasn't scared away as I think many are at this/these point(s) in your article.

    As well, I suggest you proof read your book overall as there are a number of misplaced or duplicated words within sentences that make one pause and have to re-read and analyze it to grasp the passage or sentence, meaning they are illogical distractions in the flow of things being read.

    __All the above said, I think this is a wonderful article overall and one of the best attempts I've seen to date regarding generating interests for new potential Linux users. My Hat's Off to you Alistair! I'm no tech wiz by anyone's stretch of imagination and could not have written this myself. I went back to Windows being forced too use it in my work-place with proprietary software that will not and can not run on Linux. I've pushed the developers to no avail as of yet. Software in question deals with peoples personal and financial info etc, and I don't own the business although was given the opportunity to establish things on Linux several years ago had I been able to utilize said software. Security of customers info wasn't a risk I was willing to take considering the stipulation was "Windows proprietary 'said' software or nothing". Yes Linux alternatives were/are available, but the owner wasn't interested in them, although an intelligent and smart man, chose to stay with the popular/majority industry usage of 'said' software on the Windows platform. I found myself in need of 'said' software on my home PC for business interaction enough so that it was inconvenient to keep up with Linux during this time. Thus abandoning use of Linux for the time …as it were. My personal preference was and is Ubuntu Studio Linux. However, enough said.

    _Again, I commend your effort regarding your article here and thank you for taking the time to compose it. I hope my suggestions are helpful, and by no means are they meant to be insulting or sarcastic of your effort. As stated in the beginning, they're simply my opinion and suggestions in the hope that they will make things a little less confusing for the n00bs and potential new Linux users, and add to article for the betterment of all.

    Thanks for reading, if in fact you made it this far …lol! A bit long winded yes, but better thorough than left for question IMHO.

    *** Keep up the good work Alistair!

    @ Newbies: To those of you on the fence regarding Linux, don't be afraid. It's easier than you might think! Try it on a "live" disc first without installing it. It will run a bit slower off the disc initially, but once installed you'll be amazed at how fast and simple it really is to learn and use. Using your computer will be fun and exciting again. Spend your time enjoying it rather than fixing it or taking out a loan to keep up with the latest. Try it, I think you'll like it! 😉

    Kindest Regards,
    Visible Spirit

    • Alistair Ross | April 11, 2017 at 9:13 am | Reply

      Hi there,
      Thanks so much for taking the time to read through the copy and make all of your suggestions.
      The guide has been made up from years worth of content and as you’d imagine, a lot of that can get tired after a while. When I get the time, I update the content, however looking for irregularities like you found can often be like looking for a needle in a haystack, so I am indebted to you for your efforts in doing so.
      I have made the immediate changes you have suggested, but I think a rewrite of chapter six and seven, perhaps replacing six entirely with a ‘Using desktop Linux’ page, and seven with a simpler installing software guide is probably in order.
      If you have any further comments, please do let me know, I welcome all feedback, good and bad!

Leave a Reply