Pin Me

How to Install Programs in Kubuntu

written by: PatrickDickey•edited by: Christian Cawley•updated: 10/17/2010

You have your new installation of Kubuntu on your computer. But you've found that it's missing a few programs that you need to get up and running at full steam. How do you install what you need? This article aims to explain the different ways of installing programs in Kubuntu.

  • slide 1 of 13

    Introduction

    You've installed Kubuntu and have the default programs at your avail. However there are some programs that you want to install because the defaults don't handle your needs. So, how do you go about installing these programs in Kubuntu? This article will lead you through the process--whether it be from a repository or file, command line or Package Manager.

  • slide 2 of 13

    Main Sources of Files

    Your three main sources of files to install in Kubuntu are from repositories, individual .deb (debian installer) files, or from the source code (commonly packaged in tarball files (.tar)). Each package maintainer may have their own repositories, or they may have their packages included in the official (K)ubuntu repositories (I put the "K" in parenthesis, because you can use any of the Ubuntu repositories, even though you are on Kubuntu). Or they may supply you with the .deb installer (or source code in a tar file), and you will have to meet the dependencies yourself.

  • slide 3 of 13

    Main Methods of Installing Programs

    The main methods of installing programs are by using either apt-get, or dpkg -i in the command line, installing from the source code, or using gdebi or the Package Manager in the desktop. You can open a terminal on your desktop to use the CLI if you wish, but you are still using these main methods. Also in terms of the Package Manager, there are different managers available for Kubuntu than Ubuntu (although you can install the Ubuntu manager on Kubuntu and vice versa).

    Check out this comparison on installing via the command line or through a package manager for a complete look at the question.

  • slide 4 of 13

    Installing from the Command Line

    If you wish to install the program from the command line, you have two options. You can either open a terminal window on your desktop (the "K" button --> Applications --> System --> Terminal (Konsole)), or you can use the keyboard combination of CTRL+Alt+ Fn (where n is a number 2 through 6)-- for example CTRL+Alt+F3. "F1" is the initial startup screen, and "F7" and "F8" are the X-shells (your desktop).

    In either case, you will use "sudo" to install the program. "Sudo" is similar to the "Run As Administrator" function in Windows (in that it only allows the current command to be run as root). You will be required to enter your password, as sudo elevates your specific user to "root" level. This is safer than requiring you to know a "root" password, and using "su -i" to elevate you to root level.

    You should perform "sudo apt-get update" before installing anything, just to make sure you have the most updated lists available to you.

    To search for the program, if you're not sure of the name, you can use sudo apt-cache search program-name. This will search for any reference to the program in the repository lists that are on your computer. This may return a long list of programs, so you will want to look through it for the names of the actual files you want to install.

    Installation Through the Terminal 

  • slide 5 of 13
    This section discusses how to install programs in Kubuntu linux, using the command line and apt-get or dpkg. It also discusses installing programs from source code using ./Configure and make. Other sections of the article describe using a GUI.
  • slide 6 of 13

    Installing Programs from the Repositories

    If the program is in the repositories, you will use "sudo apt-get install program-name" to install the program. If all of the dependencies are met, it will automatically install the program. If there are other required dependencies, you may be prompted with a list and given the option of Y/n to install or quit. Upon selecting "Y", apt will download the files and install them. You may be required to restart the computer, but typically this isn't necessary. If you have to restart, you will see an icon in the systray and an information popup may appear.

    An example of this is sudo apt-get install amsn

    You can install multiple programs at one time also like this:

    sudo apt-get install amsn pidgin evolution

  • slide 7 of 13

    Installing Programs from .deb Files

    If the maintainer provides a .deb file for the installation, you will use "sudo dpkg -i /path/program.deb" (if you only want to install for yourself, you may be able to use "dpkg -i /path/program.deb" and choose a directory in your home directory). If the program has unmet dependencies, you will be prompted with an error, and can use "dpkg -f" to have dkpg install the needed files first. Then you will have to run dpkg -i again.

    For example to install Adobe Flash for all users, you would use sudo dpkg -i /Downloads/flash10-i386.deb (this is a fake name just to illustrate the process).

    If you just wanted to use Adobe Flash for yourself, you would use dpkg -i /Downloads/flash10-i386.deb and you would have to choose a subdirectory from your Home directory (~/subdirectory) to install it in.

  • slide 8 of 13

    Installing Programs from the Source Code (.tar files)

    If you download the source code (in a tar file) and wish to install that, you will use a combination of commands to do so. You may not need to use "sudo" unless you are planning on installing it in a protected directory (pretty much anything outside of your home directory tree) or for multiple users. The method I will show uses sudo. Most programs will come with an "INSTALL" file, which you should read for the maintainers preferred instructions.

    1. The first step is to unpack the source code. You will use "tar -xvf filename.tar" for this. This will create a directory below the directory that the tar file is located in.
    2. Next, you will use cd to go into the new directory. I've found it easier to use ls -l first (to list the directories and files) and copy the name of the directory, then paste that after the cd.
    3. Once in the directory, you will use ./configure to have Ubuntu check to see if the source code meets the dependency requirements to install. These requirements include the other files that the program will use, as well as the compiler and header files for the language it was written in.
    4. If the ./configure command is successful, you will use "make" to compile the program into it's object code.
    5. Then, you will use "sudo make install" to install the program on your system.
    6. After the program is installed, you can use "clean install" to clean up after yourself.
  • slide 9 of 13
    If the command line is not your preferred method of installing programs in Kubuntu, then this section will discuss how to use KPackageKit or GDebi to install them. The previous page of this article covers CLI methods.
  • slide 10 of 13

    Installing Programs through the Graphical User Interface (GUI)

    If the command line is not your forte, you have the option of installing through Graphical User Interfaces. The method will again depend on whether you are installing from a repository or from a .deb file. The common methods are using KPackageKit for installing from the repositories or GDebi for installing from .deb files. You can also install the Synaptic Package Manager (Ubuntu's Package Manager). You can also use the Ubuntu Software Center although you may have to install it (or install the Gnome desktop to enable it).

  • slide 11 of 13

    Installing Programs through KPackageKit

    In order to install from KPackageKit, you will need to go to the "K" button, then click on Applications, System, KPackageKit. Then you will enter the package name in the search field and search for it. You may want to refresh the lists prior to this. Once you find the package(s) that you wish to install, you will click the down arrow on the right-hand side. After selecting all of the packages that you want to install, you click the Apply button.

    If the packages have dependencies, you will be presented with a list of them and the option to "Mark" or "Cancel". "Marking" will select them for installation as well. Then the installation will download the files, and install them. Depending on the packages, you may have to log out and back in (restart "X"), or restart the computer.

    If you're not sure about the package name, you can search in the description for the common name. For example, "Open Office" is the common name, but the actual package name is openoffice... So, you would have to search for "Open Office" in the description or openoffice in the package name.

    Screenshot of KPackageKit 

  • slide 12 of 13

    Installing Programs through GDebi

    To install using GDebi, you can simply open Dolphin (File Manager) and navigate to the directory (folder in the window) that has the .deb file. Then click on the file. The default in Kubuntu is if you click on the upper left hand corner (it will show a green ~ezentity_quot+ezentity_quot~ or a red "-"), that selects the file and single clicking anywhere else opens the file. You should be presented with some options--one of which is using GDebi to install the package. Choose that, and it will do the rest for you.

  • slide 13 of 13

    Final Thoughts

    Installing programs with Kubuntu (and Linux in general) is almost as easy as it is in Windows. It definitely is not as difficult as it has been made out to be. If you are able to get repositories, then it's a simple command using apt-get install. If it's a .deb file, then it's dpkg -i. If it's from source, then it's a tad bit more work--but not very complicated. The package maintainer does the hard work, so that all you have to do is run the configure and make scripts. It's even easier with the GUI interfaces. Also if the package is updated, and the updates are placed in the repositories, you will receive the updates through your normal update check. This is different from Windows, where you only receive updates for Microsoft products and Windows System Files through Microsoft Update.