MainspringGuides › zsh vs bash
macOS Guide

zsh vs bash on Mac: Why Apple Switched

Updated July 2026 · 3 min read

Since macOS Catalina in 2019, every new Mac account gets zsh as its default shell instead of bash. Both shells still ship with macOS today — Ventura, Sonoma, and Sequoia all include them — but the bash you get is frozen in 2007. Here is why Apple switched, what zsh actually does better, and how to move between the two in one command.

Why Apple switched: it was licensing, not features

Apple did not abandon bash because it was bad. Bash moved from the GPLv2 license to GPLv3 with version 4.0, and GPLv3 contains patent and anti-lockdown clauses Apple's lawyers will not accept. So Apple kept shipping the last GPLv2 release — bash 3.2, released in 2007 — for over a decade. zsh uses an MIT-style license with none of those restrictions, which lets Apple ship a current version and update it freely.

You can see the gap yourself:

# which shell is your login shell
echo $SHELL

# compare the versions macOS ships
bash --version
zsh --version

On a current Mac, bash reports 3.2.57 while zsh reports 5.9. Every bash feature added since 2007 — associative arrays, globstar, better redirection — is missing from the built-in copy.

What zsh does better day to day

For everyday interactive use the two feel almost identical: cd, pipes, redirection, and nearly all one-liners you copy from the web work the same in both.

How to switch shells either way

One command changes your login shell. It affects new Terminal windows, not the one you are in:

# make bash your login shell
chsh -s /bin/bash

# undo: switch back to zsh, the macOS default
chsh -s /bin/zsh

You will be asked for your account password. Only shells listed in /etc/shells are accepted — run cat /etc/shells to see the valid options. There is a settings route too: open System Settings → Users & Groups, Control-click your user, choose Advanced Options…, and set Login shell. The Terminal command is faster.

Note that switching your interactive shell does not change how scripts run. A script starting with #!/bin/bash still runs under the bundled bash 3.2. If you need modern bash for scripting, install it with Homebrew (brew install bash) — it lands in Homebrew's prefix and leaves the system copy untouched.

Moving your old bash config to zsh

zsh does not read .bash_profile or .bashrc. If you switched Macs and your aliases vanished, that is why. Copy the lines you care about — aliases, exports, PATH changes — into ~/.zshrc, then reload with source ~/.zshrc. Most bash aliases and environment variables work in zsh unchanged; only elaborate prompt definitions and array syntax need translation.

Your command history doesn't migrate either: bash keeps it in ~/.bash_history, zsh in ~/.zsh_history, and neither reads the other's file. And if you just need bash for a minute — to test how a script behaves under it, say — don't switch login shells at all: type bash to start one inside your current session, and exit to drop back into zsh.

Tune the rest of your Mac

While you're at the command line, Mainspring turns 90+ hidden macOS settings — Dock, Finder, keyboard, screenshots — into labelled, reversible toggles. Terminal-level control, no commands to memorize.

Try Mainspring free →

Signed & notarized by Apple · 1-day free trial · $29 once

Make the new shell yours

The default zsh setup is deliberately plain. Ten minutes in your config file gets you aliases, a better prompt, and a saner PATH — our guide to customizing your .zshrc walks through the exact lines worth adding.