Little Girl's Mostly Linux Blog

InstallSoftware


Install Software

This page was last updated on July 18, 2009.

Table of Contents

Use the command line to install packages

  1. Let your package manager know what’s installed and what’s available in the repositories by opening a terminal window and typing:
  2. sudo apt-get update
  3. Download the package and its dependencies and install them by typing this command:
  4. sudo apt-get install foo
  5. To install many packages at once, add the names of the additional packages, separating each package name from the one before it with a space:
  6. sudo apt-get install foo1 foo2 foo3

Use the GUI to install packages

You can search for packages by name and/or description, check which programs are installed, etc.

  • Use the package manager in Ubuntu:
    1. Open the main menu.
    2. Choose System
    3. Choose Administration
    4. Choose Synaptic Package Manager
    5. Use the Reload button to update the list.
    6. Browse or search the packages.
    7. Mark the packages you wish to install or uninstall.
    8. Click the Apply button at the top of the window to commit the changes.

  • Use the package manager in Kubuntu:
    1. Open the K menu.
    2. Choose System
    3. Choose Adept Manager – Manage Packages
    4. Use the Fetch Updates button to update the list.
    5. Browse or search the packages.
    6. Mark the packages you wish to install or uninstall.
    7. Click the Apply Changes button at the top of the window to commit the changes.

Use the GUI to browse the most popular packages

You can browse the most popular packages in the package manager by category with Add/Remove in Ubuntu and Kubuntu:

  • Browse the most popular packages in Ubuntu:
  • Open the main menu
  • Choose Add/Remove…
  • Browse the most popular packages in Kubuntu:
  • Open the K-menu
  • Choose Add/Remove Programs

Install a program from a .deb file

When you manually install a .deb file, dependencies are not automatically resolved for you, but you’ll find out what they are so you can install them. Download the .deb file and then install the program from the GUI or from the command line:

  • Install the program from the GUI:
    • Double-click the file and use the package installer that opens.

  • Install the program from the command line:
    1. Open a terminal window.
    2. Change to the directory the .deb file is in by typing this command:
    3. cd /path/to/file
    4. Install the package by typing this command:
    5. sudo dpkg -i packagename.deb

      Note: replace packagename with the name of the package.

Install from source (compile)

Before following these instructions, make sure you have the build-essential package installed. This is not installed by default in Kubuntu or Ubuntu.

  1. To install from source, double-click the file and extract its contents to a directory.
  2. Open a terminal window and change to the directory you extracted the files into by typing this command:
  3. cd /path/to/directory
  4. Check whether the dependency requirements are met by your system by typing this command:
  5. ./configure
  6. Compile the source code by typing this command:
  7. make
  8. Install the program by typing this command:
  9. sudo make install
  10. Remove any temporary files created during the installation process by typing this command:
  11. clean install

Install from .rpm

Before following these instructions, make sure you have the alien package installed. This is not installed by default in Kubuntu or Ubuntu.

Sometimes you just won’t be able to find a .deb file for a program you’d like to install. You can use alien to install an .rpm file in Kubuntu or Ubuntu, but it will not resolve dependencies, so this method tends to be a bit messy, and isn’t for the faint of heart…

  1. To install an .rpm file, open a terminal window and change to the directory the file is in by typing this command:
  2. cd /path/to/directory
  3. Install the .rpm file by typing this command, replacing packagename with the name of the package:
  4. sudo alien packagename.rpm

Get the dependencies of a package

Type this command in a terminal window, replacing packagename with the name of the package:

sudo apt-get build-dep packagename

Create a .deb file from source

Before following these instructions, make sure you have the checkinstall package installed. This is not installed by default in Kubuntu or Ubuntu.

  1. To create a .deb file from source, double-click the file and extract its contents to a directory.
  2. Open a terminal window and change to the directory you extracted the files into by typing this command:
  3. cd /path/to/directory
  4. Check whether the dependency requirements are met by your system by typing this command:
  5. ./configure
  6. Compile the source code by typing this command:
  7. make
  8. Create a .deb file by typing this command:
  9. sudo checkinstall -D
  10. Remove any temporary files created during the installation process by typing this command:
  11. clean install

Run a stand-alone binary file

This will run a stand-alone binary file that doesn’t need to be installed. These are often gotten from tarball or zip files.

  1. Extract the tarball or zip file to a directory.
  2. Open a terminal window and change to the directory the extracted file is in by typing:
  3. cd /path/to/file
  4. You can optionally change the permissions of the file to give read and execute access to everyone and also write access to the owner of the file by typing this command:
  5. chmod 755 filename
  6. Run the file with one of these methods:
    • If it’s on the system path:
    • scriptname
    • If it’s not on the system path:
    • ./filename

Uninstall software in Ubuntu

  • Uninstall
  • To uninstall a package and leave its configuration files in place in case you later wish to install it again, open a terminal window and type this command, replacing packagename with the name of the package:

    sudo apt-get remove packagename
  • Complete uninstall
  • To uninstall a package and remove all of its configuration files, open a terminal window and type this command, replacing packagename with the name of the package:

    sudo apt-get remove --purge packagename

See Also

See also the Psychocats page on installing software in Ubuntu.



Obligatory Happy Ending

And they all lived happily ever after. The end.

Back to top

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Connecting to %s

Theme: WordPress Classic. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.