Home > System Tutorial > LINUX > body text

Detailed explanation of Linux dpkg-query command usage (query tool for software packages in Debian Linux)

WBOY
Release: 2024-01-06 22:58:03
forward
852 people have browsed it

dpkg-query command is a query tool for software packages in Debian Linux. It queries and identifies software package information from the dpkg software package database.

grammar

dpkg-query(选项)(参数)
Copy after login

Options

-l:列出符合匹配模式的软件包;
-s:查询软件包的状态信息;
-L:显示软件包所安装的文件列表;
-S:从安装的软件包中查询文件;
-<span class="wp_keywordlink">w</span>:显示软件包信息;
-c:显示软件包的控制文件路径;
-p:显示软件包的细节。
Copy after login

parameter

Software package name: Specify the software package to be queried.

Example

Find which package file file1 is installed in:

dpkg-query -S file1
Copy after login

List the list of software installed under ubuntu:

dpkg-query -W --showformat='${Package} ${Version}\n' > filename
Copy after login

View package details:

dpkg-query -s capistrano
Copy after login

View the list of files installed to the system during software package installation:

dpkg-query -L capistrano
Copy after login

List all installed packages:

dpkg-query -l
Copy after login

Check the exact status of the software package (whether installed or not) and version number:

dpkg-query -W -f='${Status} ${Version}\n' apache-<span class="wp_keywordlink">perl</span>
Copy after login

The above is the detailed content of Detailed explanation of Linux dpkg-query command usage (query tool for software packages in Debian Linux). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template