InstallingSoftware

Differences between revisions 6 and 7
Revision 6 as of 2006-03-30 02:31:15
Size: 2151
Editor: S0106000fb085cc63
Comment: add top bar, commented out for now
Revision 7 as of 2006-04-23 20:49:18
Size: 8730
Editor: 84
Comment: Rewrote the entire thing. Still needs some work, but mostly covered.
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
There are several methods to graphically install software:
 * The '''Add Applications''' utility in the '''Applications menu'''
 * '''Synaptic Package Manager''', which can be found in the ''System'' > ''Administration'' menu.
<!> ''Work in progress''
Line 7: Line 5:
See CommandLinePackageManagement for how to manage software and packages. == Introduction ==
By default, many useful programs are installed when you put Ubuntu onto your computer. However, from time to time you may need to perform a task that the default set of applications cannot manage, and so will require some new software. Or you might just want to try out a alternative program to one which is already installed. Installing software in Ubuntu is easy, and this guide will show you how to do it.
Line 9: Line 8:
== APT ==
The main source of packages for Ubuntu is the Ubuntu software repository. You can use apt-get, synaptic, and 'Add applications' to query this repository and install software from it.
If you'd like to get some background information on what's happening when you install software (which may be a little technical in places), read ''Packages and Package Management''. If you just want to get started installing new programs, you can skip straight to ''Installing a Package''.
Line 12: Line 10:
=== Adding repositories ===
Sometimes the default repositories are not enough. In these cases, extra repositories can be added to the APT database. You will often find information on repositories in the following format: {{{
deb <url> <component-list>}}}
== Packages and Package Management ==
Line 16: Line 12:
You can add a repository in one of the following ways:
 * In ''Add Applications'' via ''Settings'' > ''Repositories'' > ''Add'' > ''Custom''. Enter the supplied repository line here.
 * In ''Synaptic'' via the same menus as in ''Add Applications''.
 * By manually editing the file {{{/etc/apt/sources.list}}} You will need superuser privileges for this, and please make a backup before editing. Just paste the repository line at the end of the file.
=== What is a package? ===
''Software'' is a very broad term, and is generally taken to mean a program which you can run on your computer. However, such programs often need other resources to help them accomplish their tasks. When you install software, thousands of files might be required just to let the program start! When you think that they all have to be put into exactly the right location, and some of those files might need to be changed depending on what type of computer you have, it all gets very complicated. But you don't have to worry about this - Ubuntu has a way of handling all this complexity.
Line 21: Line 15:
The page http://www.ubuntulinux.nl/source-o-matic can help you find extra repositories. Ubuntu uses ''packages'' to store everything that a particular program needs to run. Packages are collections of files bundled into a single file, which can be handled much more easily. As well as the files required for the program to run, there will be special files called ''installation scripts'', which copy the files to where they are needed amongst other things.
Line 23: Line 17:
=== Add Applications ===
The add applications tool shows you a lot of desktop applications (such as games, office applications, e-mail and usenet clients etcetera). You can easily select software and let the system install it all for you.
=== Source or Binary? ===
Normally, when someone makes a package for a program, they put all of the ''source code'' for the program into that package. Source code is written by programmers and is essentially a list of instructions to a computer which humans are able to read and write. Computers can only understand this code if it is ''interpreted'' for them into a form that they can use directly. One such way of interpreting source code for a computer is by ''compiling'' it into ''binary'', which computers are able to understand.
Line 26: Line 20:
=== Synaptic ===
The Synaptic application will show you all available packages in the repositories you have selected (Fortunately it has a search function too). Installing software is just as easy as with the previous tool.
So why don't the people who make the package (called ''packagers'') just convert it into binary straight away? Well, different computers use different types of binary, so if you make a binary package for one type (like an Intel PC), it won't work on another (like an Apple Macintosh).
Line 29: Line 22:
Synaptic also has the possibility to download and instal updates to your system. Source packages are simply packages which just include source code, and can generally be used on any type of machine if the code is compiled in the right way. Binary packages are ones which have been made specifically for one type of computer, or ''architecture''. Ubuntu supports the x86 (i386 or i686), AMD64 and PPC architectures - to find out which one you are using, open ''Applications'' | ''Accessories'' | ''Terminal'', type {{{arch}}} then hit the enter key. The correct binary packages will be used automatically, so you don't have to worry about picking the right ones.

=== Package Managers ===

A package manager is an application which handles the downloading and installation of packages. Ubuntu includes a few package managers by default, and which one you use depends on how advanced the package management tasks are that you want to achieve. Most people will only need to use the most basic package manager, the ''Add/Remove tool'', which is very easy to use.

=== Repositories ===
Where can you get packages from? Ubuntu stores all of its packages in locations called ''repositories''. A repository is simply a location which holds packages of similar types, which can be downloaded and installed using a package manager. A package manager will store an index of all of the packages available from a repository. Sometimes it will 're-build' this index to make sure that it is up to date and knows which packages have been upgraded or added into the repository since it last checked.

There are four Ubuntu repositories for each architecture - Main, Restricted, Universe and Multiverse. Each has a different purpose. By default, only packages from Main and Restricted can be installed. If you would like to be able to install packages from Universe or Multiverse, read the AddingRepositoriesHowto.

In addition to the official Ubuntu repositories, it is possible to use ''third party repositories''. Be careful - some are not compatible with Ubuntu and using them may cause programs to stop working or may even cause serious damage to your installation. The page http://www.ubuntulinux.nl/source-o-matic can help you to find extra repositories, and the AddingRepositoriesHowto gives instructions on how to enable them.

== Installing a Package ==

=== Add/Remove - the basic method ===
The easiest way of installing a package is to use the 'Add/Remove' tool. Click ''Applications'' | ''Add/Remove...'' to start it. First, find the package or packages you want to install. You can search for a keyword, such as 'email', or look through the categories shown on the left hand side of the window. Once you've found a package you want to install, tick the box next to its icon. You can do this for as many packages as you like.

Once you've finished choosing, click the ''Apply'' button at the bottom of the window. Another window will pop up, showing all of the packages you've selected and asking if you'd like to apply the changes. To install the packages, click ''Apply''. You'll then be asked to type in your super-user/administrator password. Once you've entered it, another window will appear informing you of the installation progress. Once this has finished, click ''Close''. Your new programs are installed, ready to use!

=== Synaptic - the more advanced method ===
The Synaptic Package Manager offers a more advanced way of installing packages. If you have problems finding a suitable package with the Add/Remove tool, try using the search in Synaptic. This searches ''all'' of the packages in the available repositories, even the ones which don't contain programs.

For details on using Synaptic, read the SynapticHowto.

=== Aptitude - the text-based method ===

Aptitude is a terminal-based package manager. Read AptitudeSurvivalGuide for more information on how to use Aptitude.

=== apt-get - the technical method ===
The apt-get program is a command-line package manager, which should be used if the Add/Remove tool and Synaptic ever run into problems. It provides an advanced interface to APT, the underlying package management system which Ubuntu uses, but is reasonably easy to operate if you ever have to use it. Power users may find that apt-get is quicker to use and more powerful than the graphical options above.

For details on how to use apt-get, read AptGetHowto and CommandLinePackageManagement.

=== Installing downloaded packages ===

Sometimes you might want to install a package which you have downloaded from a website, rather than a software repository. These packages are called .deb files.

You can use gdebi or dpkg to install .deb files.

=== Automatic updates ===

Ubuntu will automatically notify you when security updates and software upgrades are available. Simply click the update icon, type in your super-user/administrator password and follow the instructions on-screen to download and install the updates.

== Glossary ==

'''Architecture'''
The type of processor the computer uses is referred to as its architecture.

'''Binary Package'''
A package which contains a program suitable for one particular architecture.

'''Source Package'''
A package which contains the original code for a program, which must be compiled to be usable on a particular architecture.

'''Repository'''
A location from which packages of a similar type are available to download and install.

'''Package Manager'''
A program which handles packages, allowing you to search, install and remove them.

'''apt'''
apt is the 'Advanced Package Tool', the program on which Ubuntu's Package Managers are based. apt handles the more complicated parts of package management, such as maintaining a database of packages.

'''deb'''
A .deb file is an Ubuntu (or Debian) package, which contains all of the files which the package will install.

Info <!> Work in progress

Introduction

By default, many useful programs are installed when you put Ubuntu onto your computer. However, from time to time you may need to perform a task that the default set of applications cannot manage, and so will require some new software. Or you might just want to try out a alternative program to one which is already installed. Installing software in Ubuntu is easy, and this guide will show you how to do it.

If you'd like to get some background information on what's happening when you install software (which may be a little technical in places), read Packages and Package Management. If you just want to get started installing new programs, you can skip straight to Installing a Package.

Packages and Package Management

What is a package?

Software is a very broad term, and is generally taken to mean a program which you can run on your computer. However, such programs often need other resources to help them accomplish their tasks. When you install software, thousands of files might be required just to let the program start! When you think that they all have to be put into exactly the right location, and some of those files might need to be changed depending on what type of computer you have, it all gets very complicated. But you don't have to worry about this - Ubuntu has a way of handling all this complexity.

Ubuntu uses packages to store everything that a particular program needs to run. Packages are collections of files bundled into a single file, which can be handled much more easily. As well as the files required for the program to run, there will be special files called installation scripts, which copy the files to where they are needed amongst other things.

Source or Binary?

Normally, when someone makes a package for a program, they put all of the source code for the program into that package. Source code is written by programmers and is essentially a list of instructions to a computer which humans are able to read and write. Computers can only understand this code if it is interpreted for them into a form that they can use directly. One such way of interpreting source code for a computer is by compiling it into binary, which computers are able to understand.

So why don't the people who make the package (called packagers) just convert it into binary straight away? Well, different computers use different types of binary, so if you make a binary package for one type (like an Intel PC), it won't work on another (like an Apple Macintosh).

Source packages are simply packages which just include source code, and can generally be used on any type of machine if the code is compiled in the right way. Binary packages are ones which have been made specifically for one type of computer, or architecture. Ubuntu supports the x86 (i386 or i686), AMD64 and PPC architectures - to find out which one you are using, open Applications | Accessories | Terminal, type arch then hit the enter key. The correct binary packages will be used automatically, so you don't have to worry about picking the right ones.

Package Managers

A package manager is an application which handles the downloading and installation of packages. Ubuntu includes a few package managers by default, and which one you use depends on how advanced the package management tasks are that you want to achieve. Most people will only need to use the most basic package manager, the Add/Remove tool, which is very easy to use.

Repositories

Where can you get packages from? Ubuntu stores all of its packages in locations called repositories. A repository is simply a location which holds packages of similar types, which can be downloaded and installed using a package manager. A package manager will store an index of all of the packages available from a repository. Sometimes it will 're-build' this index to make sure that it is up to date and knows which packages have been upgraded or added into the repository since it last checked.

There are four Ubuntu repositories for each architecture - Main, Restricted, Universe and Multiverse. Each has a different purpose. By default, only packages from Main and Restricted can be installed. If you would like to be able to install packages from Universe or Multiverse, read the AddingRepositoriesHowto.

In addition to the official Ubuntu repositories, it is possible to use third party repositories. Be careful - some are not compatible with Ubuntu and using them may cause programs to stop working or may even cause serious damage to your installation. The page http://www.ubuntulinux.nl/source-o-matic can help you to find extra repositories, and the AddingRepositoriesHowto gives instructions on how to enable them.

Installing a Package

Add/Remove - the basic method

The easiest way of installing a package is to use the 'Add/Remove' tool. Click Applications | Add/Remove... to start it. First, find the package or packages you want to install. You can search for a keyword, such as 'email', or look through the categories shown on the left hand side of the window. Once you've found a package you want to install, tick the box next to its icon. You can do this for as many packages as you like.

Once you've finished choosing, click the Apply button at the bottom of the window. Another window will pop up, showing all of the packages you've selected and asking if you'd like to apply the changes. To install the packages, click Apply. You'll then be asked to type in your super-user/administrator password. Once you've entered it, another window will appear informing you of the installation progress. Once this has finished, click Close. Your new programs are installed, ready to use!

Synaptic - the more advanced method

The Synaptic Package Manager offers a more advanced way of installing packages. If you have problems finding a suitable package with the Add/Remove tool, try using the search in Synaptic. This searches all of the packages in the available repositories, even the ones which don't contain programs.

For details on using Synaptic, read the SynapticHowto.

Aptitude - the text-based method

Aptitude is a terminal-based package manager. Read AptitudeSurvivalGuide for more information on how to use Aptitude.

apt-get - the technical method

The apt-get program is a command-line package manager, which should be used if the Add/Remove tool and Synaptic ever run into problems. It provides an advanced interface to APT, the underlying package management system which Ubuntu uses, but is reasonably easy to operate if you ever have to use it. Power users may find that apt-get is quicker to use and more powerful than the graphical options above.

For details on how to use apt-get, read AptGetHowto and CommandLinePackageManagement.

Installing downloaded packages

Sometimes you might want to install a package which you have downloaded from a website, rather than a software repository. These packages are called .deb files.

You can use gdebi or dpkg to install .deb files.

Automatic updates

Ubuntu will automatically notify you when security updates and software upgrades are available. Simply click the update icon, type in your super-user/administrator password and follow the instructions on-screen to download and install the updates.

Glossary

Architecture The type of processor the computer uses is referred to as its architecture.

Binary Package A package which contains a program suitable for one particular architecture.

Source Package A package which contains the original code for a program, which must be compiled to be usable on a particular architecture.

Repository A location from which packages of a similar type are available to download and install.

Package Manager A program which handles packages, allowing you to search, install and remove them.

apt apt is the 'Advanced Package Tool', the program on which Ubuntu's Package Managers are based. apt handles the more complicated parts of package management, such as maintaining a database of packages.

deb A .deb file is an Ubuntu (or Debian) package, which contains all of the files which the package will install.


CategoryDocumentation CategoryCleanup

InstallingSoftware (last edited 2008-08-06 16:32:35 by localhost)