Home > Mac OS X > Mac OS X – Adding executables to PATH

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/.

sudo nano /Users/Your_User_Name/.bash_profile

insert the following line and save changes to file.

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

Mac OS X

Comments are closed.