which
prints out the full path of the command it's passed. For example, try typing which pwd
into your command line. You should see /bin/pwd
as the result. This simply means that the executable command for pwd
is stored in the /bin
directory.
Like Mike noted, if you run which psql
, and the result is /usr/bin/psql
it means that the executable command for your Postgresql database server is in the /usr/bin
directory, which means Bash
isn't going to run the Postgres.app database server.
Bash is an old Unix acronym, which stands for 'Bourne-Again Shell' As you can probably guess, it's just a pun on the name of Stephen Bourne, who authored the original Bourne shell, which is the foundation for the command line interface in Unix. (Mac OS is based on Unix).
The .bash_profile
is a file that states which commands will be executed when you open your terminal. (aka Bash).