Incomplete command list of Debian software package management tools

Source: Internet
Author: User
The command list of the Debian software package management tool is incomplete. For more information, see Debian. All the package information in the Debian system is under/var/lib/dpkg. the/var/lib/dpkg/info directory stores the Information and Management Files of each software package. each file has the following functions:
The configuration list of the file recording package ending with ". conffiles.
The file ending with ". list" records the file list of the software package. You can find the specific installation location of the software package file in the file.
The file ending with ". md5sums" records the md5 information for packet verification.
The file ending with ". config" is the installation configuration angular of the software package.
The ". postinst" section is used to complete the configuration after the Debian package is unbound. It is usually used to execute commands related to the Installed Package and restart the service.
Run the ". preinst" command before Debain unpacks. The main function is to stop the software package services that will be upgraded until the software package is installed or upgraded.
The ". prerm" script is used to stop the daemon service associated with the software package and run it before deleting the software package associated file.
The ". postrm" script is used to modify the software package link or file association, or delete the files created by it.

/Var/lib/dpkg/available is the description of the software package.
Includes all the software packages in the Debian installation source used in the current system, as well as the software packages that have been installed and not installed in the current system.

1. dpkg package management tool
Dpkg -- info "package name" -- list the package names after the package is unwrapped.
Dpkg-l -- list all packages in the current system. You can use it with the parameter less in the split screen view.
Dpkg-l | grep-I "package name" -- view the packages associated with "package name" in the system.
Dpkg-s: query the details of installed packages.
Where the installed software package is installed in the dpkg-L query system.
Which package does dpkg-S query system belong to a file.
Dpkg-I queries the detailed information of the deb package. After downloading a software package to a local computer, check whether it is installed ).
Dpkg-I install the software package manually (this command does not solve the dependency problem before the Software Package). If you encounter software dependency problems when installing a software package, you can use apt-get-f install to solve the reliability problem.
Dpkg-r uninstall the software package. The configuration file does not exist.
Dpkg-P all unmount (but it still cannot solve the dependency problem of the software package)
Dpkg-reconfigure Reconfiguration
2. apt advanced package management tools
(1) "synaptic" of GTK graphics, which is the front-end tool of APT.
(2) "aptitude", which is also the front-end tool of APT.
You can use the APT management tool to manage packages by using the following methods:
(1) Use the installation disk as the source. The method is as follows:
Apt-cdrom ident scan information of the disc
Apt-cdrom add a CD Source
(2) The most common method is to add the source to/etc/apt/source. list, and then update the apt-get update column.
Common commands of APT management tools
Apt-cache can be used with different sub-commands and parameters to find and display software, package information, and package trust relationships.
Apt-cache stats displays statistics of all the Debain data sources used by the current system.
Apt-cache search + "package name" to find related software packages.
Apt-cache show + "package name" to display the details of the specified software package.
Apt-cache depends + "package name", you can find the dependency of the software package.
Apt-get upgrade: update all packages in the system to the latest version.
Apt-get install installation package
Apt-get -- reindtall install reinstall the Software Package
Apt-get remove uninstall software package
Apt-get -- purge remove uninstall software package completely
Apt-get clean clear useless software packages
Before using the command apt-get install, download the software package to/var/cache/apt/archives and then install it. so we can use apt-get clean to clear software packages in the/var/cache/apt/archives directory.
Source code package installation
Apt-cache showsrc: Find the file information of the source package (before download)
Apt-get source to download the source package.
Apt-get build-dep + "package name" build the compiling environment of the source package.

One problem: by default, java runtime environment is installed in debain. Where can I install it?

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.