Zsh, or z shell, is a popular shell alternative to bash and tcsh, complete with many improvements and customization options offered through the Oh-My-ZSH project.
If you’d like to use zsh as the default shell in Terminal for Mac OS rather than bash, you can do so rather easily with taking the following steps:
How to Set zsh as Default Shell in Terminal for Mac
- Open the Terminal app and pull down the “Terminal” menu, choosing “Preferences”
- To change all shells to default to zsh:
- Choose the “General” tab and change “Shells open with:” to “Command (complete path)” and place the following:
- To change a specific profile shell to zsh:
- Choose the “Profiles” tab and select a profile to adjust from the list (or create a custom one)
- Go to the “Shell” tab and check “Run command:” and enter “zsh”
- Open a new Terminal window or open a new window with the specific profile you set zsh for, you’ll now have zsh as your default
/bin/zsh/
This change to zsh as the default shell will persist between quitting and relaunching Terminal, though any currently active shells or terminal windows would need to refresh or manually enter zsh.
Yes there are other ways to do this, but interestingly enough, specifying a shell to open actually helps to speed up the Terminal app in Mac OS in many cases, so it may offer a performance boost as well (for the record, it doesn’t need to be zsh to get the speed improvement, you can change the default shell to anything available on the Mac for the same effect).
You can also change iTerm, the popular Terminal replacement, to use zsh as the default shell by going to the app Preferences and adjusting Profiles > General > Command to ‘zsh’
Now that you have zsh as your default shell in MacOS or Mac OS X, you may want to take a look at the great oh-my-zsh project at https://github.com/robbyrussell/oh-my-zsh to find themes, functions, and other customizations to bring to zsh.