How to Change the Default Shell to Bash on macOS Catalina

Terminal window on a macOS Catalina desktop.

With macOS Catalina, Apple is now using Zsh as the default shell. We love Zshbut the old and trusty Bash shell is always included with macOS and you can quickly go back to Bash if you prefer.

Zsh is only the default shell of newly created user accounts. As a result, all existing accounts on an upgraded Mac 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 under macOS, simply run the chsh -s (change shell) command in a terminal window.

Change the default shell to Bash by running the following command:

chsh -s / bin / bash

You will need to enter the password for your user account. Finally, close the terminal window and reopen it. You will use Bash instead of Zsh.

Change the default shell to Bash on macOS Catalina.

Change the default shell to Zsh by running this command:

chsh -s / bin / zsh

Enter your password when prompted. Once the terminal window is closed and reopened, you will use Zsh.

Change the default shell to Zsh on macOS Catalina.

You can see a list of included shells that you can select by running the following command:

cat / etc / shells

List of available shells in macOS Catalina terminal.

From System Preferences

You can also change this option graphically in System Preferences if you prefer.

Go to System Preferences> Users and Groups on your Mac. Click on the lock icon and enter your password. Hold down the Ctrl key, click the name of your user account in the left pane, and then select "Advanced Options."

Open advanced options in Users and Groups on macOS.

Click the "Login Shell" drop-down list and select "/ bin / bash" to use Bash as the default shell or "/ bin / zsh" to use Zsh as the default shell. Click "OK" to save your changes.

Change the default login shell graphically in macOS Catalina.

Bash on macOS is still out of date

Note that the version of Bash (Bourne Again SHell) included with macOS is still quite outdated. If you run bash –version, you will see that Catalina includes Bash 3.2.57 when Bash 5.0 is the latest version. The most recent versions are licensed under GPLv3, while Apple still distributes a licensed version of GPLv2.

On the other hand, the version of Zsh (shell Z) supplied with macOS (check with zsh – version) is Zsh 5.7.2, which is the most recent version at the time of the release of Catalina.

Showing versions of Bash and Zsh on macOS Catalina.

If you want the latest version of Bash, you can install it yourself via Homebrew.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.