Reputation: 617
I'm on a mac OS X
I wanted to install an extension to the zsh shell --> Oh-my-zsh:
I ran the following commands using the Iterminal:
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
sudo sh -c "echo '/usr/local/bin/zsh' >> /etc/shells"
After the above command the process chocked and I could not change the current shell to the zsh shell
chsh -s /usr/local/bin/zsh
After this I closed the iTerminal, restarted it but it would not really load. Clicking on the application opened the iTerminal window for a second and then closes again.
The same does also happen to the regular terminal window. I click on the application the terminal opens but get the following message:
login: /usr/local/bin/zsh: No such file or directory
It seems as the previous command crocked the load direction for the terminal to load the correct shell is screwed up.
Does any one know how I can reset this to the previous shell without having access to the terminal window.
Upvotes: 27
Views: 26299
Reputation: 921
After trying I solved this problem. To permanently change your default Terminal shell:
Choose Preferences from the Terminal menu.
Select the option "Execute this command (specify complete path):"
Change the selected text entry from /bin/tcsh to reflect a different Terminal shell, such as:
/bin/bash
/bin/csh
/bin/zsh
/bin/zsh-4.0.4 (Mac OS X 10.2.8 or earlier)
/bin/zsh-4.1.1 (Mac OS X 10.3 or later)
/bin/ksh (Mac OS X 10.4 or later)
Close the Terminal Preferences window.
Quit and open Terminal again. The first and subsequent new Terminal windows open with the shell that you designated in Preferences.
Upvotes: 38
Reputation: 31130
On MAC:
Upvotes: 29
Reputation: 71
just choose preferences from the terminal menu and select the option shells open with "command (complete path)" and type this path:
/bin/bash
Upvotes: 7