How to Set the Default Terminal on Mac OS X

I was testing out a bash script on my Mac and the script had some code to switch the shell from /bin/zsh to /bin/bash so that I would have similar shell to the servers the code would run on. There was also code to switch it back to /bin/zsh but I think with the script erroring out it didn’t run and I stopped using that part of the script before I finished it.

In any case, I restarted my computer and the zsh look disappeared. The console would say that zsh was now default or something like that which threw me off the trail as I took it as saying that zsh was being used but it meant it as a warning. More like “Hey! You’re not using zsh and zsh is now Mac’s default! Get with it!”

Once I realized it wasn’t zsh I new what to look for. Surprisingly, or maybe not so surprisingly, I’d never switched shells on my Mac’s outside of the initial install of zsh.

Here’s how you can get it back.

CLI version:chsh -s /bin/zsh

Or in Mac UI:
1. Choose Apple menu  > System Preferences, then click Users & Groups. 
2. Click the lock, then enter your account name and password.
3. Control-click your user name in the list of users on the left, then choose Advanced Options. 
4. Choose a shell from the ”Login shell” menu, then click OK to save the changes.

If you are using a JetBrains IDE you can set the default console in Preferences -> Tools -> Terminal.

Leave a Reply

Your email address will not be published. Required fields are marked *