Originally Posted by jCash
Is there a command that you can use to find where certain types of software is installed?
For example: php where
Your example will be hard to use as PHP is an enormous application. In addition, PHP has a lot of locations, so it depends on what you are looking for (for example, the php.ini is located in muliple places such as /etc/apache2/php/php.ini depending on the distro) Simple applications (such as ls) are easier to illustrate:
masterc@rackster ~ $ which ls
masterc@rackster ~ $ whereis ls
ls: /bin/ls /usr/bin/ls /usr/man/man1/ls.1.bz2 /usr/man/man1p/ls.1p.bz2 /usr/share/man/man1/ls.1.bz2 /usr/share/man/man1p/ls.1p.bz2
Now for PHP, it's a little more complicated:
masterc@rackster ~ $ which php
Returns the location of the PHP binary (which if that's what you need, great) but often it's not the PHP binary we want to know the location of, but where the php.ini is that the PHP is using (or Apache is using). It is defineable at the command line with a -c switch:
/usr/bin/php -c /wherever/i/want/php.ini
If you are wondering where Apache is looking, check in apache's conf directory (usually located in /etc/apache2/conf) for info on that (depends on your distro or how you installed it).