列出源中所有安装包
root@debian:~# apt-cache search all |more
flashplugin-nonfree - Adobe Flash Player - browser plugin
ttf-mscorefonts-installer - Installer for Microsoft TrueType core fonts
iucode-tool - Intel processor microcode tool
nvidia-installer-cleanup - Cleanup after driver installation with the nvidia-installer
glx-alternative-mesa - allows the selection of MESA as GLX provider
gcc-4.7-base - GCC, the GNU Compiler Collection (base package)
libc6 - Embedded GNU C Library: Shared libraries
libbz2-1.0 - high-quality block-sorting file compressor library - runtime
libselinux1 - SELinux runtime shared libraries
tar - GNU version of the tar archiving utility
dpkg - Debian package management system
perl-base - minimal Perl system
查看源里的安装包
root@debian:~# apt-cache search memcached
memcached - A high-performance memory object caching system
nginx-extras - nginx web/proxy server (extended version)
nginx-full - nginx web/proxy server (standard version)
nginx-naxsi - nginx web/proxy server (version with naxsi)
root@debian:~# apt-cache search all|grep memcached
memcached - A high-performance memory object caching system
root@debian:~# dpkg -s vim
Package: vim
Status: install ok installed
Priority: optional
Section: editors
Installed-Size: 1877
Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
Architecture: amd64
Version: 2:7.3.547-7
Provides: editor
Depends: vim-common (= 2:7.3.547-7), vim-runtime (= 2:7.3.547-7), libacl1 (>= 2.2.51-8), libc6 (>= 2.11), libgpm2 (>= 1.20.4), libselinux1 (>= 1.32), libtinfo5
Suggests: ctags, vim-doc, vim-scripts
Description: Vi IMproved - enhanced vi editor
查看系统中的某个文件属于那个软件包
root@debian:~# dpkg -S /etc/vim/vimrc
vim-common: /etc/vim/vimrc 查看已经安装的包
vim-common: /etc/vim/vimrc
root@debian:~# dpkg -l |grep vim
ii vim 2:7.3.547-7 amd64 Vi IMproved - enhanced vi editor
ii vim-common 2:7.3.547-7 amd64 Vi IMproved - Common files
ii vim-runtime 2:7.3.547-7 all Vi IMproved - Runtime files
ii vim-tiny 2:7.3.547-7 amd64 Vi IMproved - enhanced vi editor - compact version