About Me

My photo
Drum & Bass Producer, Software Developer, Love my Cats

Mac : How to configure $PATH in terminal

Most developers use a terminal in Mac from time to time. Sometimes, the $PATH gets ruined. So this is how to change it permanently in terminal:

1. What is my current $PATH? type "echo $PATH"

2. Adding "newpath" to your $PATH in the current terminal session (will be deleted when you close terminal):
"export PATH=$PATH:/newpath"

3. Setting the $PATH permanently:
3.1 (*change "USER" with your mac username)
"nano ~USER/.bash_profile"
3.2 add paths to the file separated with ":"
3.3 [control]+[x] to exit, [y] to save changes, [enter] to overwrite the file

Hope this helps you configuring your mac os x path with terminal and use all the command line tools you need handy