How to Change the Default Terminal Shell in macOS (Zsh, Bash, Fish)

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:

  1. Launch the Terminal app on your Mac (located in Applications > Utilities or via Spotlight search).
  2. Print your current login shell environment variable:
    echo $SHELL
  3. Output will typically show /bin/zsh on modern macOS releases, or /bin/bash on older versions.
  4. To view the full roster of approved, pre-installed shells supported by macOS, display the contents of the /etc/shells configuration 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:

  1. Click the Apple menu () in the top-left corner of your screen and select System Settings….
  2. Scroll down the left sidebar and select Users & Groups.
  3. Hold down the Control key and click (or right-click) on your user account name in the list.
  4. Select Advanced Options… from the contextual menu.
  5. Authenticate using Touch ID or your administrator password.
  6. In the Advanced Options sheet, locate the Login shell dropdown menu.
  7. Click the dropdown and choose your preferred shell (e.g., /bin/zsh, /bin/bash, or enter a custom path).
  8. 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:

  1. Install your desired shell via Homebrew:
    # To install modern Bash 5+
    brew install bash
    
    # Or to install the Fish shell
    brew install fish
  2. On Apple Silicon Macs (M1/M2/M3/M4), Homebrew binaries reside in /opt/homebrew/bin/. On Intel Macs, they reside in /usr/local/bin/.
  3. Before chsh will accept a new shell binary, its path must be appended to the approved /etc/shells system 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
  4. Now apply the newly installed shell as your default:
    chsh -s /opt/homebrew/bin/fish
  5. 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:

  1. Open your Bash profile configuration file in a terminal text editor:
    nano ~/.bash_profile
  2. Add the following environment variable to the very top of the file:
    export BASH_SILENCE_DEPRECATION_WARNING=1
  3. Press Ctrl + O followed by Enter to save, then press Ctrl + X to exit.
  4. Subsequent terminal windows running Bash will now open silently without the warning banner.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.