How to Change Default Shell to Zsh
Bash had been the staple of CLI shell for macOS until macOS Catalina in 2019. For unpublished reason, which is speculated to be Bash’s license, Apple has decided to change the default shell to zsh. Regardless, since the adoption, Terminal would display a short warning and a method to switch over to zsh.
The command shown on the Terminal worked only on the Apple Silicon device. It must be run without sudo
, as that would change the shell of the root, not the user:
chsh -s /bin/zsh
However, it didn’t quite do the trick with the Intel Mac. It’s been migrated over multiple times, so I’m guessing that might be the reason. In the worst case, it is possible to locate zsh in bin
folder, but I found the following command to do the trick. Again, it has to be run without the sudo
:
chsh -s $(which zsh)
I was pleasantly surprised by availability of different plugins and tools for zsh. If it isn’t for your liking, bash is still on the system. It is possible to switch back to bash using the same command with the same flag as before. It’s been about 5 years since the change, and I haven’t had any compatibility issues. Personally, if the text readability or general UI were the issues, I would recommend keeping zsh and change the theme that fits the needs.