linux to see if yum and rpm and dpkg is installed

  • 2020-05-24 06:43:43
  • OfStack

preface

Because there are so many ways to install Linux software, there is no universal way to find out if some software is installed.

This sums up the following categories:

1. The rpm package is installed and can be used rpm -qa See if you want to find out if a package is installed rpm -qa | grep “软件或者包的名字” .


[root@hexuweb102 ~] rpm -qa | grep ruby

2. It is installed in the deb package and can be used dpkg -l Can see. If you are looking for the specified package, use dpkg -l | grep “软件或者包的名字” ;


[root@hexuweb102~]dpkg-l|grepruby

3. yum method installed, can be used yum list installed Find, if you are looking for the specified package, add | grep “软件名或者包名” ;


[root@hexuweb102 ~] yum list installed | grep ruby

4. If you compile and install it as a source package, such as.tar.gz or tar.bz2, this only depends on whether the executable exists.

Neither of the above methods sees packages installed in this source form. If installed as an root user, the executable is usually in the /sbin:/usr/bin directory.

Description: where rpm yum Is the package management command of Redhat series linux, and dpkg is the package management command of debian series

conclusion


Related articles: