大家好,又见面了,我是你们的朋友全栈君。
-i:安装软件包;
-r:删除软件包;
-P:删除软件包的同时删除其配置文件;
-L:显示于软件包关联的文件;
-l:显示已安装软件包列表;
--unpack:解开软件包;
-c:显示软件包内文件列表;
--confiugre:配置软件包。
命令: dpkg -i <.deb file name>
实例: dpkg -i zabbix-release_4.0-3+bionic_all.deb
root@zabbix-web2:~# dpkg -i zabbix-release_4.0-3+bionic_all.deb
Selecting previously unselected package zabbix-release.
(Reading database ... 102712 files and directories currently installed.)
Preparing to unpack zabbix-release_4.0-3+bionic_all.deb ...
Unpacking zabbix-release (1:4.0-3+bionic) ...
Setting up zabbix-release (1:4.0-3+bionic) ...
命令:dpkg -L package
安装完包后,可以用此命令查看软件安装到什么地方,
实例: dpkg -L zabbix-release
root@zabbix-web2:~# dpkg -L zabbix-release
/.
/etc
/etc/apt
/etc/apt/sources.list.d
/etc/apt/sources.list.d/zabbix.list
/etc/apt/trusted.gpg.d
/etc/apt/trusted.gpg.d/zabbix-official-repo.gpg
/usr
/usr/share
/usr/share/doc
/usr/share/doc/zabbix-release
/usr/share/doc/zabbix-release/README.Debian
/usr/share/doc/zabbix-release/changelog.Debian
/usr/share/doc/zabbix-release/copyright
命令:dpkg -l package
实例:dpkg -l zabbix-release
root@zabbix-web2:~# dpkg -l zabbix-release
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 zabbix-release 1:4.0-3+bioni all Zabbix official repository configuratio
命令:dpkg -r package
实例:dpkg -r zabbix-release
命令:dpkg -P package
实例:dpkg -P zabbix-release
命令:dpkg -s package
实例:dpkg -s zabbix-release
命令:dpkg -c package.deb 列出 deb 包的内容
实例:dpkg -c zabbix-release
dpkg –unpack package.deb 解开 deb 包的内容
dpkg -S keyword 搜索所属的包内容
dpkg –configure package 配置包
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/143260.html原文链接:https://javaforall.cn