Dpkg command detailed usage tutorial-Linux general technology-Linux technology and application information, the following is a detailed reading. There are many types of linux package management, in addition to rpm, apt, and other excellent dpkg. Below is a detailed usage tutorial of dpkg command, hope to be useful to you.
Deb package management is an excellent package management tool. debian ubuntu is used in linux systems;
Use the dpkg command:
Dpkg-l view the information of software packages installed in the current system
Dpkg-L (software package name) view the detailed list of software files installed in the system
Dpkg-s view the details of the specified software package that has been installed
Dpkg-S: Check the software package that a file in the system belongs;
Installation of dpkg-I *. deb File
Unmount the dpkg-r *. deb file;
Dpkg-P thoroughly uninstalling software configuration files, etc.
View uninstalled deb package commands
Dpkg-c: query the file rpm-qlp contained in the deb package file
Dpkg-I query the detailed information of the deb package
Instructions:
The most common ones are-I and-r. Easy to install/uninstall. Needless to say.
The following describes the four command parameters that are most commonly used and recommended. Note: L, l, S, and s. Size L and size S.
-----------
Dpkg-L |? Listfiles <软件包名> ... List all files that "Belong" to the software package (or multiple software packages)
Similar to synaptic's viewing package attributes:
~ $ Dpkg-L gcc-3.4 | head-n 5
/.
/Usr
/Usr
/Usr/doc
/Usr/doc/gcc-3.4-base
-----------
Dpkg-l |? List [ <表达式> ... Briefly list the status of a software package
Find packages and use expressions, which is much easier
$ Dpkg-l gcc *
Expected status = unknown (u)/installation (I)/deletion (r)/clear (p)/keep (h)
| Current status = Not (n)/installed (I)/only available configuration (c)/Only decompressed (U)/configuration failed (F)/not fully installed (H)
|/Error? = (None)/keep (?) /Reload (R)/both (#) (Status, error: Capital = fault)
|/Name VERSION description
++-============================================= ==============================================
Ii gcc 3.3.5-1 The gnu c compiler
Un gcc-2.95 <无> (No introduction)
Un gcc-3.2 <无> (No introduction)
Gcc-3.3 3.3.5-8ubuntu2 The gnu c compiler
Ii gcc-3.3-base 3.3.5-8ubuntu2 The GNU Compiler Collection (base package)
Un gcc-3.3-doc <无> (No introduction)
Ii gcc-3.4 3.4.3-9ubuntu4 The gnu c compiler
Ii gcc-3.4-base 3.4.3-9ubuntu4 The GNU Compiler Collection (base package)
Un gcc-3.4-doc <无> (No introduction)
Un gcc-3.5-base <无> (No introduction)
Ii gcc-4.0-base 4.0.0-7ubuntu6 The GNU Compiler Collection (base package)
Un gcc-doc <无> (No introduction)
-----------
Dpkg-S |? Search <表达式> ... Search for software packages that own the file (or multiple files)
Find a package from a single (multiple) file:
$ Dpkg-S/usr/ doc/gcc-3.4-base/FAQ.gz
Gcc-3.4:/usr/doc/gcc-3.4-base/FAQ.gz
The link can also be automatically processed.
$ Ls-l/usr/bin p *
Lrwxrwxrwx 1 root 15/usr/bin poeci-> eciadsl-pppoeci
$ Dpkg-S/usr/bin poeci
Eciadsl-usermode:/usr/bin poeci
-----------
Dpkg-s |? Status <软件包名> ... Displays detailed status information of the software package.
Synaptic depends on the dependency.
$ Dpkg-s gcc-3.4
Package: gcc-3.4
Status: install OK installed
Priority: optional
Section: devel
Installed-Size: 4404
Maintainer: Debian GCC maintainers
Architecture: i386
Version: 3.4.3-9ubuntu4
Provides: c-compiler
Depends: gcc-3.4-base (> = 3.4.3-9ubuntu4), libgcc1. 4.3-9ubuntu4), libc6 (> = 2.3.2.ds1-4), cpp-3.4 (> = 3.4.3-9ubuntu4), cpp-3.4 (<3.4.5), binutils (> = 2.15-5)
Recommends: libc6-dev (> = 2.3.2.ds1-16)
Suggests: gcc-3.4-doc (> = 3.4.3-9ubuntu4), amd64-libs-dev
Conflicts: gcc-3.2 (<=. 2.3-0pre8)
Description: The gnu c compiler
This is the gnu c compiler, a fairly portable optimizing compiler for C.
.
ABIs changed between gcc-3.3 and gcc-3.4 on some ubuntures (hppa, m68k,
Mips, mipsel, iSCSI). Please read/usr/doc/gcc-3.4/README. Debian
For more details.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service