1

I want to open programs in Terminal by writing a single command, like what is already done for Java complilation:

javac HelloWorld.java

For any program I install, that functionality isn't available. For example, to open SWI-Prolog I have to type

/opt/local/bin/swipl

when I want to type just

swipl

which results in a -bash: swipl: command not found. How do I create this new command?

1 Answer 1

3

Adjust the BASH PATH environment variable. Edit your .bash_login or .bash_profile in your home directory, add at the end of the file the follwing lines:

 PATH=$PATH:/opt/local/bin
 export PATH

Source your file or simply close the current terminal and open a new one.

Not the answer you're looking for? Browse other questions tagged or ask your own question.