Zsh (Z Shell) is the default login and interactive shell for Terminal Application since macOS Catalina, before Catalina the default shell used to be bash (Mojave and before).
How to know which is your current shell on macOS Terminal?
There are multiple ways you can know currently which shell you have been using, the easiest way is by doing an echo command with $0.Example:
% echo $0 zsh
How to switch between shells on macOS Terminal?
Switching between shells on macOS Terminal is very easy, just type the shell name that you want to get into and press the return (Enter) key.Example:
code2care@mac ~ % bash The default interactive shell is now zsh. To update your account to use zsh, please run `chsh -s /bin/zsh`. For more details, please visit https://support.apple.com/kb/HT208050. bash-3.2$ zsh code2care@mac ~ % ksh $ zsh code2care@mac ~ %
Note: As you move from zsh shell to bash, you will be prompted with a messaging saying "The default interactive shell is now zsh."
How to change the default login shell on macOS Terminal?
Though zsh is the recommended default shell for macOS, if you want to switch to some other shell as a default one, you can do that by following the below steps,
- Click on the Apple logo on the Menu -
- Now go to System Preferences..,
- Select Users & Groups,
- Click on the lock - you will be prompted to enter your username and password,
- Control + Click on your user-name and select Advanced Options
- Under login-shell select the shell you want to move to - ksh, bash, csh, tsch etc.
- Fix zsh: permission denied: script.sh
- Fix - zsh: command not found: conda [macOS]
- zsh: command not found: brew macOS Monterey 12
- Fix for zsh: command not found: brew
- zsh: command not found [fix] macOS
- zsh terminal mac 12.0
- How to silence the warning - The default interactive shell is now zsh on macOS