How to edit corrupted bash profile
I exported a PATH that is incorrect in my bash profile, and I can no longer open it to edit it. Even worse, my terminal is basically completely broken because of this. If I run vim ~/.bash_profile I get the following errors: -bash: vim: command not found -bash: sed: command not found If I try to use a command like ls I get: -bash: ls: command not found -bash: sed: command not found How can I fix my bash profile if I can't even edit it? Your terminal isn't broken, bash is just lost because it is using this broken PATH variable, which you have saved in ~/.bash_profile. So, when you reload