Debian GNU/Linux : apt
stephane
Debian GNU/Linux systems come with a handy tool to manage packages : apt.
These are the commands I use the most.
Searching for a package
% apt-cache search a2ps<br /> a2ps-perl-ja - perl version of Miguel Santana's a2ps (supports KANJI)<br /> a2ps - GNU a2ps - 'Anything to PostScript' converter and pretty-printer<br />
Updating package repository information
This allows you to get the latest information about the available packages (latest versions, archive names, …) :
`
apt-get update
Get:1 http://mir2.ovh.net stable/main Packages [4535kB]
Get:2 http://mir2.ovh.net stable/main Release [95B]
[…]
Get:8 http://security.debian.org stable/updates/main Release [110B]
Fetched 11.7MB in 1m5s (178kB/s)
Reading Package Lists… Done
`
Installing a package
# apt-get install a2ps Reading Package Lists... Done<br /> Building Dependency Tree... Done<br /> The following extra packages will be installed:<br /> libpaper1<br /> Suggested packages:<br /> [...]<br /> The following NEW packages will be installed:<br /> a2ps libpaper1<br /> 0 upgraded, 2 newly installed, 0 to remove and 184 not upgraded.<br /> Need to get 20.4kB/745kB of archives.<br /> After unpacking 3240kB of additional disk space will be used.<br /> Do you want to continue? [Y/n]<br /> [...]<br /> Creating config file /etc/papersize with new version<br /> Setting up a2ps (4.13b.dfsg.1-1) ...<br />
Upgrading the entire system
# apt-get dist-upgrade
All the packages installed get upgraded to the latest available versions.
Defining sources
All packages sources are defined in /etc/apt/sources.list :
% cat /etc/apt/sources.list<br /> #deb file:///cdrom/ sarge main<br /> deb http://mir2.ovh.net/debian/ stable main<br /> deb http://mir2.ovh.net/debian/ testing main<br /> deb-src http://mir2.ovh.net/debian/ stable main<br /> deb http://security.debian.org/ stable/updates main<br />