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
Asked
Active
Viewed 937 times
0
-
What exactly did you try from the linked post? – nohillside Jun 29 '16 at 20:17
1 Answers
1
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.

nohillside
- 100,768

Bora
- 1,266
-
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 – user190161 Jun 29 '16 at 16:18
-
-
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
-
-
-
-
-
-
-
-sh: source: filename argument required source: usage: source filename [arguments] – user190161 Jun 29 '16 at 16:40
-
-
Try to restart? I don't know at this point... My suggestions above usually fixed the problem. – Bora Jun 29 '16 at 16:53
-
echo $PATH #figured out that it directs me to the .profile instead of the .bash_profile. Can this be the problem? Also if I open the .profile with a text edit, its written that The original version is saved in .profile.pysave. Can i retrieve the original version? – user190161 Jun 29 '16 at 17:45
-
-
FIXED it! Thank you much for your advises! Actually the PATH name never changed. It was the .profile name instead of the .bash profile which remained the same! thank you much – user190161 Jun 29 '16 at 19:18