Preface
The command to finding out if package is installed in Linux is depend upon your Linux distribution. Following are commands for different distributions.
Debian / Ubuntu Linux
Use dpkg command, which is package manager for Debian. Suppose you want to find out sudo is installed or not, type command:
Use file /var/lib/dpkg/available to find out all package names available to you. Or you can use following command (list all packages in /var/lib/dpkg/status):
Once you've found package name, use the following command to get exact status (whether it is installed or not):
Red Hat Enterprise / Fedora Linux / Suse Linux / Cent OS
Under Red Hat/Fedora Linux use rpm command:
For example find out package mutt installed or not:
Supplement
* 20 Practical Examples of RPM Commands in Linux
* rpm command cheat sheet for Linux
沒有留言:
張貼留言