Linux下查看是否安装过某个软件

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/kwame211/article/details/86620790

1、rpm包安装的,可以用 rpm -qa 看到,如果要查找某软件包是否安装,用 rpm -qa | grep "软件或者包的名字"

rpm -qa | grep perl
2、以deb包安装的,可以用 dpkg -l 看到。如果是查找指定软件包,用 dpkg -l | grep "软件或者包的名字"

dpkg -l | grep perl
-bash: dpkg: command not found
3、yum方法安装的,可以用 yum list installed 查找,如果是查找指定包,用 yum list installed | grep "软件名或者包名"

yum list installed | grep perl
补充:

查看是否安装Perl,一般都安装了,Linux必备。

##如果安装会打印,版本等信息
perl --version
##查找perl安装目录
whereis perl
 
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
(with 33 registered patches, see perl -V for more detail)
 
Copyright 1987-2012, Larry Wall
 
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
 
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the

猜你喜欢

转载自blog.csdn.net/kwame211/article/details/86620790