How to set zsh as the default terminal shell
I prefer zsh
over bash
as my everyday shell. Unfortunately, zsh
is not the default shell on macOS.
Here’s a quick guide on how to make it as a default shell for your machine:
1. Install zsh
#
Make sure zsh is available on your system. If not, install it with brew
.
$~ brew install zsh
$~ which zsh
/usr/local/bin/zsh #output
2. Set zsh
as default shell#
To set is as default shell, run the following in your terminal:
$~ sudo sh -c "echo $(which zsh) >> /etc/shells"
$~ chsh -s $(which zsh)
Then, simply reopen your shell again and it should used zsh
as the default shell. That’s it.
To check which shell you’re using#
If you are still unsure whether your shell is running zsh
or bash
, run the following in your terminal:
$~ echo $0
-zsh #output
Read other posts