Within Redhat (Centos) and/or problably more distributions, this command search for which packages are installed:
rpm -qa | grep “package” –> is this package installed?
rpm -ql | grep “package” –> list the packages files
rpm -qi | grep “complete package name” –> what kind of package is it?
rpm -qf /etc/redhat-release–> wich release?