With macOS Catalina, Apple it now using Zsh as default shell. We love Zsh, but the old reliable Bash shell is still included with macOS, and you can quickly go back to bash if you wish.
Zsh is just the default shell on newly created user accounts, so any existing account you have on an upgraded Mac will still use Bash by default unless you change it. Each user account has its own default shell preference.
From the Terminal
To change the default shell of a user account in macOS, just run the chsh -s
(cambiar shell) command in a Terminal window.
Change the default shell to Bash by running the following command:
chsh -s /bin/bash
You must enter the password of your user account. In conclusion, close the Terminal window and reopen it. You will use Bash instead of Zsh.
Change the default shell back to Zsh by running this command:
chsh -s /bin/zsh
Enter your password when prompted. After closing the terminal window and reopening it, will be using zsh.
You can see a list of included shells that you can choose from by running the following command:
cat /etc/shells
From System Preferences
You can also change this option graphically from System Preferences if you prefer..
Head to System Preferences> Users and Groups on your Mac. Click on the lock icon and enter your password. Hold down the Ctrl key, click on your user account name in the left panel and select “Advanced Options”.
Click on the drop-down box “Login Shell” and select “/ bin / bash” to use Bash as your default shell or “/ bin / zsh” to use Zsh as your default shell. Click on “To accept” to save your changes.
Bash on macOS is still out of date
Despite this, note that the version of Bash (Bourne Again SHell) included with macOS is still pretty outdated. If you run bash --version
, you will see that Catalina includes Bash 3.2.57 when bash 5.0 it's the latest version. Newer versions are licensed under the GPLv3, while Apple still distributes a GPLv2 licensed version.
Conversely, Zsh's version (shell Z) included with macOS (consult with zsh --version
), is Zsh 5.7.2, which is the latest version at the time of Catalina's release.
If you want the latest version of Bash, may install it yourself via Homebrew.