How to Switch the Default Shell to Bash on macOS

Table of Contents

Apple is now using Zsh as the default shell on macOS. But the trusty old Bash shell is still included with macOS, and you can quickly switch back to Bash if you prefer. Zsh became the default in macOS Catalina and higher version of macOS.

Note

Zsh is only the default shell on newly created user accounts, so any existing accounts 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.

Change to Bash Shell from the Terminal

To change a user account’s default shell on 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’ll have to enter your user account’s password. Finally, close the Terminal window and reopen it. You’ll be using Bash instead of Zsh.

bonben@Killer ~ % chsh -s /bin/bash
Changing shell for bonben.
Password for bonben: 
bonben@Killer ~ % 
Killer:~ bonben$ bash
bash-3.2$ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin21)
Copyright (C) 2007 Free Software Foundation, Inc.
bash-3.2$ 

Change the default shell back to Zsh by running this command the reopen the Terminal window.

chsh -s /bin/zsh

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

cat /etc/shells
bash-3.2$ cat /etc/shells 
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.
/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh

Change default shell from System Preferences

Alternatively, you can also change this option graphically from System Preferences if you prefer.

1. Navigate to System Preferences > Users & Groups on your Mac. 

2. Click the lock icon 🔒 and enter your password to make changes.

3. Right-click your user account’s name in the left pane and select Advanced Options.

How to Switch the Default Shell to Bash on macOS

4. Click the Login Shell dropdown box and select /bin/bash to use Bash as your default shell or /bin/zsh to use Zsh as your default shell. Click OK to save your changes.

How to Switch the Default Shell to Bash on macOS

Leave a Comment

Required fields are marked *