Starting with macOS Catalina, Apple transitioned the default command-line login shell from GNU Bash to Zsh (Z shell). While Zsh brings modern interactive features—such as enhanced auto-completion, rich theme support, and advanced globbing—many software developers, DevOps engineers, and system administrators rely on legacy Bash scripts, specific shell frameworks, or alternative shells like Fish. When opening older shells on a Mac, the operating system even displays a persistent deprecation banner urging users to migrate to Zsh.
Fortunately, macOS maintains full flexibility over user login shells. Whether you wish to return to classic Bash, explore modern Homebrew-installed shells, or set Zsh as your standard environment across all terminal tabs, configuring your shell is straightforward. In this tutorial, we examine how to check your current shell, change your login shell using the chsh command, adjust shell defaults via macOS System Settings, register modern third-party shells, and silence deprecation notices.
Checking Your Current Shell and Available Shells in macOS
Before modifying any environment configurations, check which shell is actively executing your session and review which shell binaries macOS officially recognizes as safe:
- Launch the Terminal app on your Mac (located in Applications > Utilities or via Spotlight search).
- Print your current login shell environment variable:
echo $SHELL - Output will typically show
/bin/zshon modern macOS releases, or/bin/bashon older versions. - To view the full roster of approved, pre-installed shells supported by macOS, display the contents of the
/etc/shellsconfiguration file:cat /etc/shells
The system will output a list of authenticated paths, including /bin/bash, /bin/csh, /bin/dash, /bin/ksh, /bin/sh, /bin/tcsh, and /bin/zsh.
Method 1: Changing the Default Shell Using the chsh Command
The standard, universal Unix method to change your login shell on macOS is the chsh (change shell) utility:
1. Switching Back to Bash
If your legacy development workflow or company build scripts require Bash as your primary interactive interpreter, execute:
chsh -s /bin/bash
Terminal will prompt for your macOS account password. Enter your password (keystrokes will remain invisible for security) and press Enter.
2. Switching (or Reverting) to Zsh
To restore macOS’s recommended Z shell environment at any time, execute:
chsh -s /bin/zsh
Authenticate with your password. Close the active Terminal window and open a new one (Cmd + N) for the shell change to take effect.
Method 2: Changing the Login Shell via macOS System Settings
If you prefer a graphical interface or need to manage accounts without typing terminal commands, macOS exposes advanced user settings in System Settings:
- Click the Apple menu () in the top-left corner of your screen and select System Settings….
- Scroll down the left sidebar and select Users & Groups.
- Hold down the Control key and click (or right-click) on your user account name in the list.
- Select Advanced Options… from the contextual menu.
- Authenticate using Touch ID or your administrator password.
- In the Advanced Options sheet, locate the Login shell dropdown menu.
- Click the dropdown and choose your preferred shell (e.g.,
/bin/zsh,/bin/bash, or enter a custom path). - Click OK to apply your selection.
Method 3: Configuring Modern Third-Party Shells (Homebrew Bash or Fish)
The built-in version of Bash included in macOS is permanently locked to version 3.2 due to Apple’s policy regarding GNU General Public License v3 (GPLv3). If you want modern features found in Bash 5+ or the friendly interactive features of Fish, you can install them via Homebrew:
- Install your desired shell via Homebrew:
# To install modern Bash 5+ brew install bash # Or to install the Fish shell brew install fish - On Apple Silicon Macs (M1/M2/M3/M4), Homebrew binaries reside in
/opt/homebrew/bin/. On Intel Macs, they reside in/usr/local/bin/. - Before
chshwill accept a new shell binary, its path must be appended to the approved/etc/shellssystem registry:# For Apple Silicon Macs: echo "/opt/homebrew/bin/bash" | sudo tee -a /etc/shells # Or for Fish: echo "/opt/homebrew/bin/fish" | sudo tee -a /etc/shells - Now apply the newly installed shell as your default:
chsh -s /opt/homebrew/bin/fish - Relaunch Terminal to start using your modern custom shell.
How to Silence the macOS Bash Deprecation Warning Banner
When running /bin/bash on macOS, the system prints an automatic notice: “The default interactive shell is now zsh. To update your account to use zsh, please run `chsh -s /bin/zsh`.”
If you intentionally run Bash and want to eliminate this startup clutter:
- Open your Bash profile configuration file in a terminal text editor:
nano ~/.bash_profile - Add the following environment variable to the very top of the file:
export BASH_SILENCE_DEPRECATION_WARNING=1 - Press Ctrl + O followed by Enter to save, then press Ctrl + X to exit.
- Subsequent terminal windows running Bash will now open silently without the warning banner.