ubuntu查看已安装软件包信息的方法

ubuntu查看已安装软件包信息的方法
原创fang141x 最后发布于2019-04-15 10:41:34 阅读数 2802 收藏
展开
简介
ubuntu下面是使用dpkg来管理和安装软件包的,对应centos里面的rpm命令;而apt则是对应centos里面的yum命令,是直接在线安装软件包的,而且会比yum更好用,更强大。1

查询方法
查看安装的所有软件
对应2个命令。
root@fdm:~# dpkg -l |grep sysstat
ii sysstat 11.6.1-1 amd64 system performance tools for Linux
root@fdm:~#
root@fdm:~# apt list --installed |& grep sysstat
sysstat/bionic,now 11.6.1-1 amd64 [installed]
root@fdm:~#
root@fdm:~# apt-show-versions |grep sysstat
sysstat:amd64/bionic 11.6.1-1 uptodate
1
2
3
4
5
6
7
8
查看软件安装的路径以及信息2
-L|–listfiles … List files ‘owned’ by package(s).

root@fdm:~# dpkg -L sysstat |head -n3
/.
/etc
/etc/cron.d
1
2
3
4
-s|–status … Display package status details.

root@fdm:~# dpkg -s sysstat
Package: sysstat
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 1164
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Version: 11.6.1-1
...
1
2
3
4
5
6
7
8
9
10
查看命令所属的软件包
本地查看。对应rpm -qf
root@fdm:~# dpkg -S /usr/bin/mpstat
sysstat: /usr/bin/mpstat
1
2
apt-file是在线查看的方法,不过要先安装,此命令对应yum provides */name3

root@fdm:~# apt-file search /usr/bin/mpstat
sysstat: /usr/bin/mpstat
1
2
http://www.wumingx.cn/post/672.html ↩︎

https://blog.csdn.net/counsellor/article/details/81182567 ↩︎

https://blog.csdn.net/yessharing/article/details/55806090 ↩︎
————————————————
版权声明:本文为CSDN博主「fang141x」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/fang141x/java/article/details/89307474

原文地址:https://www.cnblogs.com/xuanbjut/p/12621288.html