Software Installation method under Linux (dpkg, APT)

Source: Internet
Author: User

First, the dpkg command a little solution

Debian, and Debian-based systems such as Ubuntu, use the package format Deb. The following is the operation of the Deb package Common Dpkg instruction table, for Beginners friends reference.

Dpkg is a Debian package management tool. The ability to install, uninstall, get information, and other operations on the package.

Command function dpkg-i package.deb Install package Dpkg-r Package Remove Packages Dpkg-p Package Delete packages (including configuration files) Dpkg-l The package lists the files associated with the packages dpkg-l Packag e Displays the version of the package dpkg--unpack Package.deb Unpack the contents of the Deb Package dpkg-s keyword search for the package content Dpkg-l list the currently installed packages dpkg-c Package.deb list The contents of the Deb package DPKG--configure Package Configuration Pack


Usage:
Install (Unpack and configure):
Dpkg-i Package_file
Dpkg--install Package_file

Unpack
Dpkg--unpack Package_file
This command only unlocks "Package_file" and does not perform package configuration work.

Configuration package:
Dpkg--configure Package

To uninstall a package:
Dpkg-r Package
Dpkg--remove Package
The command deletes the package, but retains the configuration file.
Dpkg-p Package
Dpkg--purge Package
This command deletes the package and deletes the configuration file.

Gets, sets, clears the selection state of the package:
DPKG--get-selections [Package]
Output to standard output, you can use pipe or redirect.
Dpkg--set-selections
Obtained from standard input, you can use pipelines or redirects.
Dpkg--clear-selections
Mark all packages as unloaded.

Options:
-B
--auto-deconfigure
When the package is uninstalled, all packages that depend on the unloaded package are automatically unloaded.

--no-act
--dry-run
--simulate
Test only, get output, do not make any modifications to the system.

There are also options that specify the tasks that are actually given to Dpkg-deb, Dpkg-query complete:
Dpkg-deb:
-B | --build
-C | --contents
-E | --control
-X | -extract
-F | --field
-I. | --info
-X | --vextract

Dpkg-query
-L | --list
-S | --status
-L | --listfiles
-S | --search
-P | --print-avail

Related documents:
/var/lib/dpkg/available package information.
/var/lib/dpkg/status Package Status.

Software Installation method under Linux (dpkg, APT)

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.