Where does terminal look for its commands? I've just installed pypy, and I've made a symlink from /pypy to my pypy installation.

How can I turn this into a command, so that I can just type pypy myfile.py
instead of having to type /pypy myfile.py?
if you are on Snow leopard or on Lion the way to do it is as follows:

go to /etc/paths.d then

sudo touch pypy


then edit the pypy file (with vim, nano or whatever) to include the path to pypy

/path/to/pypy


the restart the terminal. For instance, I installed julia (http://julialang.org/) and I added a julia file in paths.d

$ cd /etc/paths.d
$ ls 
50-X11   MacGPG2  TeX      TeXbin   git      julia
$ cat julia 
/usr/local/julia


HTH