Linux to view installed software (determine that the software is installed)
It's often a case of trying to tell if a software is already installed, but often RPM -qa | appears gerp name is not found There are two ways to determine whether to install or not
rpm package installed, you can see it with rpm -qa, if you want to find out whether a package is installed, use rpm -qa | grep "the name of the software or package". deb package installed, which can be seen with dpkg -l. If you are looking for a specified package, use dpkg -l | grep "the name of the software or package"; yum method installed, you can use yum list installed to find it, if it is to find the specified package, add | after the command grep "software name or package name"; For example:
Use which to determine if the brew command exists
which will output "xxx not found" to stderr when the command cannot be found.
It is best to avoid using which, as an external tool, it does not necessarily exist, and there will be differences between distributions, and some systems will not set a valid exit status, and there is a certain degree of uncertainty.
Bash provides some built-in commands such as hash, type, and command to meet the requirements.
Original:The hyperlink login is visible.
|