Differences between revisions 1 and 11 (spanning 10 versions)
Revision 1 as of 2005-09-03 20:53:55
Size: 3553
Editor: ?DavidRichardBell
Comment:
Revision 11 as of 2005-11-21 14:53:19
Size: 3785
Editor: AaronHawley
Comment: make link to graphic's text equivalent
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:

http://www.vanadac.com/~dajhorn/projects/lmsw/10%20Spam/01%20apt-get%20install%20perlstuff.png [[wiki:Self:AptGetInstallPerlStuffDescription D]]
Line 20: Line 22:
You should read the manual for this configuration file first - type "man apt-get" at a console window. You should read the manual for this configuration file first - type "man sources.list" at a console window.
Line 24: Line 26:
You can use the '''apt-setup'' tool which generates automatic source lines and adds them to the /etc/apt/sources.list (the file which configures your apt sources). Note: apt-setup doesn't wipe your existing configuration - it simply appends more sources. apt-setup is a ["debconf"] wizard. You can use the '''apt-setup''' tool which generates automatic source lines and adds them to the /etc/apt/sources.list (the file which configures your apt sources). Note: apt-setup doesn't wipe your existing configuration - it simply appends more sources. apt-setup is a ["debconf"] wizard.
Line 64: Line 66:
==Search for packages== == Search for packages ==
Line 72: Line 74:
apt-cache search <string> | less apt-get search <string> | less
Line 75: Line 77:
==List installed packages== == List installed packages ==
Line 81: Line 83:
==Further Reading== == Further Reading ==
Line 83: Line 85:
See: ["AptTools"]
See: ["Synaptic"]
 * ["AptTools"] - Further Apt Tools
 * ["Synaptic"] - Graphical Apt System
 * ["Aptitude"] - Text Apt System

This page describes how to use various CLI (command line interface) Apt tools.

?TableOfContents([3])

http://www.vanadac.com/~dajhorn/projects/lmsw/10%20Spam/01%20apt-get%20install%20perlstuff.png ?wiki:Self:AptGetInstallPerlStuffDescription D

Configuring Apt Sources

Apt downloads packages and installs them onto your computer. To do that it connects to software repositories, or sources, which contain all the packages you'd want. You can configure Apt to use a source (or multiple sources) to get these packages from. There are many sources - web (HTTP) servers, FTP servers, CD-ROM disks, network servers (etc). Generally users download packages from the internet, since most users don't download all 14 CD's (for the current Sarge release).

Editing Sources Directly

You can edit the file which determines your sources directly:

{{{1. Open a root console/terminal window (Applications -> System Tools-> Root Terminal in GNOME) 2a. Type "nano /etc/apt/sources.list"

  • - or -

2b. Type "gedit /etc/apt.sources.list" 3. Edit! }}}

You should read the manual for this configuration file first - type "man sources.list" at a console window.

Use apt-setup

You can use the apt-setup tool which generates automatic source lines and adds them to the /etc/apt/sources.list (the file which configures your apt sources). Note: apt-setup doesn't wipe your existing configuration - it simply appends more sources. apt-setup is a ["debconf"] wizard.

{{{1. Open a root console/terminal window (Applications -> System Tools-> Root Terminal in GNOME) 2. Type "apt-setup" (as root) 3. Follow the Wizard! }}}

Use apt-spy

apt-spy will generate a sources.list file (the configuration file for apt package sources) for you! It measures the latency and bandwidth to servers, and picks the best one.

To get started, you'll need to install it, and then read how to use it:

1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME) 
2. Type "apt-get install apt-spy"
3. Read about how to use apt-spy: type "man apt-spy"

Installing Packages

{{{1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME) 2. Type "apt-get install <package>" where package is the name of the package (application) you want to install.}}}

Removing a Package

{{{1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME) 2. Type "apt-get remove <package>" where package is the name of the package (application) you want to remove.}}}

Updating a Package

{{{1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME) 2. Type "apt-get update <package>" where package is the name of the package (application) you want to update.}}}

Keeping your system up-to-date

{{{1. Open a root console window (Applications -> System Tools-> Root Terminal in GNOME) 2. Type "apt-get update". 3. Type "apt-get dist-upgrade"}}}

Search for packages

{{{1. Open a console window (Applications -> System Tools-> Terminal in GNOME) 2. Type "apt-cache search <string>" where <string> is the pattern to search for.}}}

You may want to pipe the output (redirect the output) into "less" (a scrollable viewer) since the list may be huge:

apt-get search <string> | less

List installed packages

{{{1. Open a console window (Applications -> System Tools-> Terminal in GNOME) 2. Type "dpkg --list" 3. You may want to pipe (redirect) that to a program called "less" since the list will be long (type "dpkg --list | less")}}}

Further Reading

  • ["AptTools"] - Further Apt Tools

  • ["Synaptic"] - Graphical Apt System
  • ["Aptitude"] - Text Apt System