Fixing a Broken Shell
After running a few tests on my local machine to see how bad Heartbleed was, oh back in April 2014, I managed to botch a brew
update and kill bash
.
bash
would die immediately with the following error.
login: /usr/local/bin/bash: No such file or directory
[Process completed]
The temporary solution was to run bash sans user settings via bash --noprofile
. What a pain.
Checked that both .bash_profile & .bash_history existed in ~/ and still no luck. Went ahead and overwrote .bash_profile with an empty file and the following to make sure somethign wasn't corrupted or off (stray space, etc.)
PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:$PATH"
export PATH
Finally fixing broken bash
Finally fed up with having no terminal, a bit of Googling lead me to the following solution.
bash --noprofile
chsh -s /bin/bash
That's it.