$Id: debian.txt 1889 2008-08-18 21:46:56Z mjs $
$ apt-cache search <package>
$ sudo apt-get install <package>
$ sudo apt-get remove <package>
Many (most?) of the operations listed here operate on the local package cache; the following instruction updates the cache.
$ sudo apt-get update
(Running this command may be necessary if, for example apt-get update
complains about packages not found.)
All the downloaded packages are stored in /var/cache/apt/archives; to
clean this out do:
$ sudo apt-get clean
$ sudo apt-get -u upgrade
-u to show which packages will be upgraded, and allow you to confirm
whether you want to upgrade them or not. (It seems that "upgrade" will
upgrade to a new distribution.)
$ apt-show-versions -u
Note: you may need to install the "apt-show-versions" package first.
$ dpkg -l
Note: if you're looking for a convenient way to backup and restore your current system, you can do:
# backup
$ sudo dpkg --get-selections > pkglist
# restore
$ sudo dpkg --set-selections < pkglist
$ sudo apt-get dselect-upgrade
The following shows brief description dependencies, version, maintainer, etc.:
$ apt-cache show <package>
To see the files installed by a package, use (really slow!):
$ apt-file list <package>
Note: you may need to install the "apt-file" package first!
$ apt-file list <package>
... though this may not be up to date; update the database with:
$ sudo apt-file update
Note: you may need to install the apt-file package first!
$ apt-cache depends <package>
$ dpkg -S <filename>
# substring anywhere
$ apt-file search <filename>
# substring in basename
$ apt-file -F search <filename>
# regexp anywhere
$ apt-file -x search <filename>
# exact basename
$ apt-file -x search '\/<filename>$'
Note: you may need to install the apt-file package first!
This command takes a long time to run; the web version may be faster.
Apart from the command-line tools, you can use:
http://packages.debian.org/
http://packages.ubuntu.com/
killall?It's in the package psmisc.
dig?It's in the package dnsutils.
apachectl?It's probably called apache2ctl.
???
??? Do you need to? This is supposedly much easier in 8.04, which
incorporates ufw.
$ sudo iftop
As documented in the manpage, by default this will show DNS
lookups--turn these off with the -n option, or filter them out with
the "not port domain" filter.
There's some dependency problem, or something. The official
solution
seems to be to get apt to try harder:
$ sudo apt-get -u dist-upgrade
$ apt-get install build-essential # packages necessary for compiling
$ apt-get install linux-headers-$(uname -r) # headers for existing build
Install the VMware tools. First select Virtual Machine | Install VMware Tools to make a virtual CD available, then:
$ mount /dev/cdrom /cdrom
$ cd /tmp
$ tar xfz /mnt/VMwareTools*
$ /tmp/vmware-tools-distrib/vmware-install.pl
The installation of the kernel module may fail. To fix this, run the
Installing the Open VM Tools:
You need to install some package; most can be deduced from the error
messages generated by configure, but if it asks for dnet-config, you
need to install the libdumbnet-dev package (not libdnet-dev).