I accidentally messed up my $PATH. I Tried to follow the instructions from the previous similar questions but I keep having the same problem When I type: echo$ PATH, I get the following response: /Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin . Do you know how i can reset the PATH? The operating system is OS X El Capitan. Thank you so much

  • What exactly did you try from the linked post? – nohillside Jun 29 '16 at 20:17

First, run PATH=/bin:/usr/bin in Terminal.

Then open ~/.bash_profile (in terminal, nano/vim/favorite editor ~/.bash_profile) or open Finder, then press Shift+Command+G and paste it in. Then you can comment out the path line. There is no need to delete .bash_profile in its entirety, and it isn't recommended.

| improve this answer | |
  • I typed: PATH=/usr/bin:/bin:/usr/sbin:/sbin . When i open the .bash profile i do see the same path: PATH=/usr/bin:/bin:/usr/sbin:/sbin . however when i close and reopen the terminal and type: echo $PATH , the same old PATH appears. Dont know whats wrong. Tried to troubleshoot it but have the same problem. Thank you so much for your response – Pigasos83 Jun 29 '16 at 16:18
  • This might be simple but did you save? – Bora Jun 29 '16 at 16:19
  • I haven't faced this problem recently. Maybe restart? Try again? Use a diff editor? The standard 9 yards... – Bora Jun 29 '16 at 16:20
  • I tried it before but it did not work. – Pigasos83 Jun 29 '16 at 16:25
  • Tried login-logout or accepting the answer? – Bora Jun 29 '16 at 16:27

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