How to check the package of a particular command

Check the package of a particular command

If in Linux any command not working properly then find out the location of command and reinstall the package before that you have to check package of particular command

There are only two commands for checking a package of particular command.

To check the package of particular command, first check the installed location o a command using following command.

#which <command name>
#which cat


[root@linuxelearn Packages]# which cat
/bin/cat
[root@linuxelearn Packages]#


Now, use the following command
#rpm -qf <path of the command>
#rpm -qf /bin/cat


[root@linuxelearn Packages]# rpm -qf /bin/cat
coreutils-8.4-9.el6.x86_64
[root@linuxelearn Packages]#



I hope you enjoyed reading this article…

Post a Comment