How do I get a Unix Executable File to run from anywhere, like Java or Git?
You can add the location into your executable path.

Step 1: Use an editor to open ~/.profile

Step 2: Add the actual path into the file. For example, I added /Users/work/documents/fun/scripts into it and my ~/.profile looks like

export PATH=/usr/local/sbin:/opt/local/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/Users/work/documents/fun/scripts:$PATH


Step 3: Restart terminal, and issue which command. You should see the path of your program, and should be able to run the program regardless of your location.

which git
=&gt; /usr/bin/git


Or another way, move the program into the existing executable path. To see existing executable path.

echo $PATH