I tried fixing an unrelated problem by changing my path in my .bash_profile, but I think I messed up and now my terminal cant find any command, not even 'ls' or 'nano'. Is there any way to edit the bash profile file back to the original without using the command line? Is there a way I could find my bash profile in finder and edit it with the text app? Or do I have to factory wipe my MacBook?
Asked
Active
Viewed 495 times
0
-
If it's your `.bash_profile`, one workaround would be to open Terminal, go to Preferences > Startup, under "Command (complete path)" enter `/bin/sh`, and open a new terminal window. Once you edit/remove your `.bash_profile`, you can set the preferences back. – Alexander O'Mara May 04 '15 at 03:36
-
1okay yeah I fixed it by changing my setting PATH=/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin and that gave me the bash commands back and then I could use nano to edit the profile back to how it was before I messed with it. Thank you though – Grant May 04 '15 at 03:46
1 Answers
1
okay yeah I fixed it by changing my setting PATH=/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin and that gave me the bash commands back and then I could use nano to edit the profile back to how it was before I messed with it. I feel really dumb.

Grant
- 43
- 6
-
the problem with my profile is that I edited the path and forgot to add ${PATH} to the end of my path so It deleted everything but one python version. – Grant May 04 '15 at 03:49