can't get to bash_profile file to edit the path on mac

1.5k views Asked by At

I can't access my .bash_profile file to edit my environment path. I was editing it in nano, saved and exited, making it so I only have one file path that is useless and can no longer do anything such as sudo or ls. I've tried nano, vi, open, grep search, but all those command are no longer recognized because the file path is gone. I tried to find the file in finder, but can't just search for it since it's a hidden file. Where is this file in finder or how can I search for it because terminal is all but useless at this point.

1

There are 1 answers

0
Arun On BEST ANSWER

Your profile will be located in your home. typically /home/user

If you don't know where your application is located, you can just use the which command. Or you can just search for it, find / -name 'whatever' Your editors are going to be in /usr/bin/