When I run:

echo $PATH

I get this:


This is obviously completely messed up. So, how can I fix this or reset $PATH?

I'm running on El Capitan.

  • Other than the duplicate path entries make your PATH variable look messy, your PATH variable should work fine. – fd0 Nov 17 '15 at 19:56
  • 1
    What is actually wrong with PATH? That you have too many Python framework declarations? – SJT Nov 18 '15 at 10:05
  • Oh, I guess nothing is wrong with it then...My bad. – taylor018 Nov 19 '15 at 21:29
  1. To find .bash_profile enter in Terminal.app:

    defaults write com.apple.finder AppleShowAllFiles YES
  2. The .bash_profile should be in your home file folder.

  3. Open this file with some editor, like textEdit and paste it there:

    export PATH  
  4. Close and save it, then restart the console.

  5. Tap it, to hide hidden files:

    defaults write com.apple.finder AppleShowAllFiles NO
|improve this answer|||||
  • What does the int in ".bash_profile will be int?" mean? – klanomath Nov 17 '15 at 19:23
  • Sorry, corrected. – Budyn Nov 18 '15 at 8:46

The default shell on OSX is bash. So you can set your path in .bash_profile or .bashrc file in your home directory.

|improve this answer|||||

Using TextEdit, click CmdO Open user folder and then click CmdShift> to see hidden files and select .bash_profile, then edit the file to update path as below:

export PATH

Save the file, and run the command source .bash_profile from terminal.

|improve this answer|||||

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .