How to check rpm name and version

While setup new server many time same server configuration is required and we are not sure which version of rpm is installed on the new as well as old server. For example if we want to check the exim rpm version on both the servers than refer to the following steps to confirm the rpm name and version.

Login in to the shell as a root user.

root@linux [~]# which exim
/usr/sbin/exim

root@linux [~]# rpm -qf ‘/usr/sbin/exim’
exim-4.77-1

In above example the exim rpm name and version is “exim-4.77-1”

About Anant 373 Articles
Senior technical writer