Locating a command: which

To find out if a command or utility is available on your current path enter the command:

   which command_name

If the command is found its pathname is displayed. The message

   command_name: Command not found

is displayed when the command cannot be found. Multiple command names separated by spaces can be given as arguments to which. For example

finan [sparc] 21% which perl gnu
/usr/local/bin/perl
no gnu in /usr/local/bin /opt/SUNWspro/bin /usr/bin /usr/sbin /usr/ccs/bin 
/usr/ucb /usr/local/contrib/bin /usr/local/gnu/bin .
finan [sparc] 22%