How to check whether a software is installed under linux

 

 

Because there are many ways to install software in Linux, there is no general way to check whether certain software is installed. In summary, these categories are:

1. If the rpm package is installed, you can use rpm -qa to see it. If you want to find out whether a package is installed, use rpm -qa | grep "the name of the software or package".

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

2. Installed with deb package, you can see it with dpkg -l. If you are looking for a specific package, use dpkg -l | grep "name of software or package";

1
[root@hexuweb102~]dpkg-l|grepruby

3. If the yum method is installed, you can use yum list installed to find it. If you are looking for a specified package, add | grep "software name or package name" after the command;

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

4. If the source package is compiled and installed by itself, for example, in the form of .tar.gz or tar.bz2, this can only depend on whether the executable file exists.

The above two methods cannot see the package installed in this source form. If installed as root user, executable programs are usually in the /sbin:/usr/bin directory.

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

Because there are many ways to install software in Linux, there is no general way to check whether certain software is installed. In summary, these categories are:

1. If the rpm package is installed, you can use rpm -qa to see it. If you want to find out whether a package is installed, use rpm -qa | grep "the name of the software or package".

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

2. Installed with deb package, you can see it with dpkg -l. If you are looking for a specific package, use dpkg -l | grep "name of software or package";

1
[root@hexuweb102~]dpkg-l|grepruby

3. If the yum method is installed, you can use yum list installed to find it. If you are looking for a specified package, add | grep "software name or package name" after the command;

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

4. If the source package is compiled and installed by itself, for example, in the form of .tar.gz or tar.bz2, this can only depend on whether the executable file exists.

The above two methods cannot see the package installed in this source form. If installed as root user, executable programs are usually in the /sbin:/usr/bin directory.

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

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325037779&siteId=291194637