dselect
This program is a menu-driven interface to the
Debian package management system. It is particularly useful for
first-time installations and large-scale upgrades. dselect
can
dselect
begins by presenting the user with a menu of 7 items, each
of which is a specific action. The user can select one of the actions by
using the arrow keys to move the highlighter bar, then pressing the ENTER
key to select the highlighted (highlit?) action.
What the user sees next depends on the action he selected. If he
selects any option but Access
or Select
, then
dselect
will simply proceed to execute the specified action:
e.g., if the user selected the action Remove
, then dselect would
proceed to remove all of the files selected for removal when the user
last chose the Select
action.
Both the Access
menu item and the Select
menu item
lead to additional menus. In both cases, the menus are presented as
split screens; the top screen gives a scrollable list of choices, while
the bottom screen gives a brief explanation ("info") for
each choice.
Extensive on-line help is available: Use the '?' key to get to a help screen, then use the '.' key to see each of the several pages of help one screen at a time.
Some users find it easier to navigate dselect
when it is
colorized. To see color screens in dselect
, be sure that
you've executed:
export TERM=linux
before invoking dselect
.
The order in which the actions are presented in the first dselect
menu represents the order in which a user would normally choose
dselect
to install packages. However, a user can pick any of the
main menu choices as often as needed (including not at all, depending on
what one wants to do).
dpkg-ftp
before running
dselect
.) The selected "Access Method" is
stored in the file /var/lib/dpkg/cmethopt
after
dselect
exits, so if it doesn't change, then this
option need not be invoked again.
dselect
reads the file "Packages.gz" which should be
included in the top level of the directory where the Debian packages to be
installed are stored. (But if it's not there, dselect
will offer
to make it for you.)
Select
specific packages for installation on his system.
After choosing this menu item, the user is first presented with a full screen of help; he can exit it (and any help screen) by pressing the SPACEBAR. Better (for first time users) is to read all of the help screen, but repeatedly pressing the '.' key to fetch one page of help after another. Once the user exits the Help screen, he sees the split-screen menu for choosing packages to install (or remove). The top screen is a relatively narrow window into the list of Debian's nearly 500 packages; the bottom screen is a window into "info" about the package or group of packages which are highlighted in the top.
First-time users are often confused by these aspects of the Select
screen:
/var/lib/dpkg/info/PACKAGENAME.conffiles
dselect
not to upgrade a package even if the
version currently installed on your system is not as recent as the version
that's available in the Debian repository you are using (this was
specified when you set the Access Method
). (The version that's
available in the repository is given in the file Packages.gz
that's
read when the "Update" menu choice is activated.
Putting a package on "unhold" (by pressing ':'): This is the default, and means that the packages will be upgraded if a newer version is available.
foo.deb
that depend on or recommend another package, e.g.,
blurf.deb
, then dselect
will place the user in
a sub-screen of the main selection screen.
This process begins by presenting the user with a full-screen Help
file, which can be escaped by pressing SPACEBAR. Thereafter, the
user can choose among the related packages, accepting the suggested
actions (to install or not), or rejecting them. To do the latter,
press SHIFT-D; to return to the former, press SHIFT-U. In any case,
the user can save his selections and return to the main selection screen
by pressing SHIFT-Q.dselect
stores users'
selections in the file /var/lib/dpkg/status
.dpkg
: This is the main package management program, dpkg
can be invoked with many options. Some common uses are:
dpkg --help
. dpkg --info foo_VVV-RRR.deb
dpkg --install foo_VVV-RRR.deb
.
dpkg --unpack foo_VVV-RRR.deb
. Note that this
operation does not necessarily leave the package in a usable
state; some files may need further customization to run properly.
This command removes any already-installed version of the program and
runs the
preinst
script associated with the package.
dpkg --configure foo
. Among other things, this action
runs the
postinst script associated with
the package.
It also updates the files listed in the conffiles
for this package.
Notice that the 'configure' operation takes as its argument a
package name (e.g., foo), not the name of a Debian archive file
(e.g., foo_VVV-RRR.deb).
dpkg --fsys-tarfile foo_VVV-RRR.deb | tar -xf - blurf*
dpkg --remove foo
.
dpkg --purge foo
.
dpkg -l foo*
.dpkg-deb
This tool manipulates Debian archive (.deb
)files.
Some command uses are:
dpkg-deb --help
.dpkg-deb -c foo_VVV-RRR.deb
)dpkg-deb -x foo_VVV-RRR.deb tmp
extracts each of the files in foo_VVV-RRR.deb
into the
directory ./tmp
. This is convenient for examining the contents
of a package in a localized directory, without installing the package
into the root file system.dpkg-deb
(1).
dpkg-split
This Perl script splits large
package into smaller files (e.g., for writing onto a set of floppy disks),
and can also be used to merge a set of split files back into a single file.
It can only be used on a Debian system, since it calls the program
dpkg-deb
to parse the debian package file into its component records.
For example, to split a big .deb file into N parts,
dpkg-split -s foo.deb
.
This will produce N files each of approximately 460 KBytes long in the
current directory.dpkg-split -j "foo*"
.Debian GNU/Linux provides a program called the
start-stop-daemon
which is used by installation scripts
to start daemons at boot time or to stop daemons when the kernel runlevel
is changed (e.g., from multi-user to single-user or to halt).
The start-stop-daemon
command is also used when a new package
containing a daemon is installed, to stop running daemons, and restart
them as necessary, e.g., when a package is being installed with an
updated configuration script.
To learn the status of all the packages installed on a Debian system,
execute the command: dpkg -l
. This prints out a one-line
summary for each package, giving a 2-letter status symbol, the package
name, the version which is installed, and a very brief description.
To learn the status of packages whose names match the string any pattern
beginning with 'foo' by executing the command: dpkg -l "foo*"
To get a more verbose report for a particular package, execute the
command: dpkg --status foo
.
To identify the package that produced the file named foo
execute
either:
dpkg -S filename
.
This searches through the lists of installed files.
This is (currently) equivalent to
searching all of the files having the file extension of .list
in the directory /var/lib/dpkg/info/
.
grep foo Contents
, or zgrep foo Contents.gz
.
This searches for files which contain the substring foo
in their full path names. The files Contents
and Contents.gz
reside in the major package directories (Debian-1.1, non-free, contrib, etc.)
at a Debian FTP site. A Contents
file refers only to the packages
in the subdirectory tree where it resides. Therefore, a user
might have to search more than one Contents
files to
find the package containing the file foo
.