Archive

Archive for September 25th, 2009

Mac OS X – Adding executables to PATH

September 25th, 2009

This example will show how to add executables of a folder named “scripts” to your PATH variable (bash).

The PATH variables configuration is stored in .bash_profile file which is located at /Users/Your_User_Name/.

1
sudo nano /Users/Your_User_Name/.bash_profile

insert the following line and save changes to file.

1
export PATH=${PATH}::~/scripts
Then just close and reopen terminal and check if it worked by executing the following command.
1
echo $PATH
Now you should find ~/scripts (and some other directories) in the output
export PATH=${PATH}:~/bin:~/scripts

Mac OS X