Setting PATH in Mac OSX

In order for any executable to run anywhere in terminal, we need to set the $PATH to the directory.

You can check which directory can be globally accessed by typing this command

echo $PATH

  1. To add that path to the file, login as root
  2. Type nano /etc/paths
  3. Edit the file to add another path
  4. Save and exit
  5. You need to restart the terminal in order for change to take effect

 

Leave a Reply

Your email address will not be published. Required fields are marked *