2

I managed to kill all access to the shell by trying to install fish shell via brew and then set the default shell to fish via:

chsh -s /usr/local/bin/fish

Unfortunately fish doesn’t seem to exist (I didn’t read the install errors from brew properly) and now the Terminal just quits when loading.

How can I reset the shell to bash without using the shell?

Giacomo1968
  • 55,001
Yunti
  • 123
  • Do you have another user? That command would only have affected your user so you could log in as foo, switch to root and then fix things. – terdon Sep 06 '15 at 12:14

1 Answers1

0

You can change the shell back to Bash—or any other installed shell—via the Mac OS X “Users & Groups”/“Accounts” preference pane under system preferences.

Here are instructions adapted from this 2009 answer on how to change a user’s default shell in Mac OS X:

  1. Open “System Preferences.”
  2. Open the “Accounts”/“Users & Groups” preference pane and unlock the preference pane if applicable.
  3. On the user you wish to change the shell, control+click or right click on the user and choose “Advanced Options…”
  4. Where it says “Login Shell:” change this to the shell you wish to use; in this case, change it to /bin/bash.

Note that “Login Shell:” is not a blank text field; it has a pull-down menu with a full list of installed shells you can use.

Giacomo1968
  • 55,001