In Linux/Unix, the whereis command will help to find out which command shell executes and to print binary (command) file location for specified command. It could php, mysql, mysqld, httpd, … or a particular command.
Example:
+ Find out PHP command location:
whereis php
Output:
php: /usr/bin/php /etc/php.ini101124 /etc/php.d /etc/php.ini110307 /etc/php.ini /etc/php.ini101228 /usr/include/php /usr/share/man/man1/php.1.gz
+ Find out MYSQL command location:
whereis mysql
Output:
mysql: /usr/bin/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
+ Find out HTTPD command location:
whereis httpd
Output:
httpd: /usr/sbin/httpd.worker /usr/sbin/httpd /usr/sbin/httpd.event /etc/httpd /usr/include/httpd /usr/share/man/man8/httpd.8.gz
