每天学个 Linux 命令 | dpkg

介绍

dpkg 命令全称是 Debian package,即 Debian 系统的软件安装、管理、卸载工具,基于 Debian 系列 Linux 发行版基本都用 dpkg 命令来管理软件安装包。

格式

1
dpkg [参数] 软件包

参数

示例

1
2
3
4
5
6
7
root@PAOPAO:~# dpkg -l vim
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===========================-==================-==================-===========================================================
ii vim 2:8.0.1453-1ubuntu amd64 Vi IMproved - enhanced vi editor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
root@PAOPAO:~# dpkg -L vim
/.
/usr
/usr/bin
/usr/bin/vim.basic
/usr/share
/usr/share/bug
/usr/share/bug/vim
/usr/share/bug/vim/presubj
/usr/share/bug/vim/script
/usr/share/doc
/usr/share/doc/vim
/usr/share/doc/vim/NEWS.Debian.gz
/usr/share/doc/vim/changelog.Debian.gz
/usr/share/doc/vim/copyright
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/vim