The common method of dpkg command in Linux

Source: Internet
Author: User
Tags unpack

If Ubuntu is installing new software, there is already a Deb installation package (for example: Iptux.deb), but you cannot log on to the desktop environment. So how do you install it? The answer is: Use the dpkg command.

The dpkg commands are often formatted as follows:

The code is as follows:

sudo dpkg-i iptux.deb#

View the details of the Iptux.deb package, including the software name, version, and size (where-I is equivalent to –info)

The code is as follows:

sudo dpkg-c iptux.deb#

View the file structure contained in the Iptux.deb package (where-C is equivalent to –contents)

The code is as follows:

sudo dpkg-i iptux.deb#

Install Iptux.deb software package (where-I is equivalent to –install)

The code is as follows:

sudo dpkg-l iptux#

View information for the Iptux package (the software name can be viewed through the dpkg-i command, where-L is equivalent to –list)

The code is as follows:

sudo dpkg-l iptux#

View all files for the Iptux package installation (the software name can be viewed through the dpkg-i command, where-L is equivalent to –listfiles)

The code is as follows:

sudo dpkg-s iptux#

View the details of the Iptux software package (the software name can be viewed through the dpkg-i command, where-S is equivalent to –status)

The code is as follows:

sudo dpkg-r iptux#

Uninstall the Iptux software package (the software name can be viewed through the dpkg-i command, where-R is equivalent to –remove)

There are several other common uses:

Solution Package:

The code is as follows:

Dpkg--unpack Package_file

This command only unpack "package_file" and does not perform package configuration work.

Configuration package:

The code is as follows:

Dpkg--configure Package

Gets, sets, and clears the selection status of the package:

Copy Code

The code is as follows:

DPKG--get-selections [Package]

Output to standard output, you can use pipelines or redirects.

The code is as follows:

Dpkg--set-selections

Obtained from standard input, you can use pipelines or redirects.

The code is as follows:

Dpkg--clear-selections

Mark all packages as unloaded.

Options:

-B

--auto-deconfigure

When the package is unloaded, 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 the tasks specified are actually handed over to Dpkg-deb, Dpkg-query:

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

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.