Written by
Jenny ZengSummary: This post explains what "The default interactive shell is now zsh." on Monterey/Big Sur/Catalina is and three ways to remove the message, including steps to change shell to zsh.
If you just changed from zsh to bash or updated to macOS Catalina/Big Sur/Monterey, you may receive the message reading "The default interactive shell is now zsh. To update your account to use zsh, please run 'chsh -s /bin/zsh'. For more details, please visit https://support.apple.com/kb/HT208050." whenever you open Terminal.
Apple has changed the default interactive shell from bash to zsh since macOS Catalina. Later macOS versions like macOS Monterey/Big Sur also have the default shell configured to zsh. If your Mac's default shell is still the old bash or you set Terminal to open with bash or other shells when running these operating systems, you will see the warning.
You must be confused if you are unfamiliar with Terminal and the interactive shells. But worry not, we will help you understand the "The default interactive shell is now zsh." message, remove it and change the default interactive shell on Mac if you want.
What does 'The default interactive shell is now zsh.' mean?
There are several interactive shells that interpret and execute the commands we enter in Terminal on Mac. Among them, zsh(Z shell) and bash(Bourne again shell) are used more often.
On macOS Mojave and earlier, bash is the default interactive shell. But Apple has been stuck with version 3.2 of bash(released in 2006) for a long time as new bash versions are licensed under GPLv3, which is restrictive to companies like Apple that sign their own code. I guess that's part of the reason why they want to change the macOS default shell.
Starting from macOS Catalina, zsh replaced bash as the default shell on Mac for it is most compatible with bash and closer to bash's functionality. Apple also embedded a warning in Terminal to remind users who haven't switched to zsh the adjustment and promote the update.
If your user account was created before macOS Catalina, which still has bash as the default shell, or you invoke the bash shell while your Mac is set to use zsh, you will see the message that reads "The default interactive shell is now zsh. To update your account to use zsh, please run `chsh -s /bin/zsh`. For more details, please visit https://support.apple.com/kb/HT208050." in Terminal.
How to remove 'The default interactive shell is now zsh.'?
If you don't use Terminal that often, you can ignore the message. Otherwise, you can remove "The default interactive shell is now zsh." on Monterey/Big Sur/Catalina with the methods below.
- Way 1: Change default shell to zsh
- Way 2: Hide 'The default interactive shell is now zsh.' and continue using bash
- Way 3: Switch to the bash shipped by Homebrew
You click the button below to share these solutions to your favorite platform.
Way 1: Change default shell to zsh
Besides the situations we stated above, you can also encounter "The default interactive shell is now zsh." on Mac when running Python or certain files under the folders in VSCode. If you are ready to embrace zsh as many others have done, you can change default interactive shell on Mac using the command the "The default interactive shell is now zsh." warning suggests.
Follow the steps below to switch shell to zsh using Terminal:
- Open Terminal if you haven't already.
- Input the following command and hit Enter.chsh -s /bin/zsh
- Type in your password and press Enter again.
- Restart your Mac for the change to take effect.
Alternatively, you can change bash to zsh from the Users & Groups preference pane.
How to switch to bash from zsh from System Preferences:
- Click the Apple menu > System Preferences > Users & Groups.
- Tap on the padlock on the lower left, enter your password, and click Unlock.
- Right-click on your account and select "Advanced Options."
- Choose /bin/zsh from the drop-down menu next to "Login shell."
- Click OK.
- Reboot your Mac.
Now that you have managed to change default interactive shell on Mac to zsh, you will no longer receive the messages saying, "The default interactive shell is now zsh."
Way 2: Hide 'The default interactive shell is now zsh.' and continue using bash
If you know the benefits of zsh, such as more customization and smarter auto-completion, but still prefer the familiar bash, you can hide 'The default interactive shell is now zsh.' by adding a line of code(export BASH_SILENCE_DEPRECATION_WARNING=1) to one of the following files: ~/.bash_profile, ~/.profile, or ~/.bashrc.
How to get rid of the notification when the Mac terminal shows 'The default interactive shell is now zsh.':
- Open Terminal.
- Input the command below and press Enter to add the line to ~/.bash_profile.touch ~/.bash_profile && echo "export BASH_SILENCE_DEPRECATION_WARNING=1" >> ~/.bash_profile
If modifying the ~/.bash_profile didn't do the trick, replace ~/.bash_profile in the code with ~/.profile or ~/.bashrc and rerun the command. Strangely, some users who are already using zsh may also get the warning when opening a new console. In which case, becoming root and adding the line to /etc/profile is more reliable.
Remove "The default interactive shell is now zsh." on Monterey/Big Sur/Catalina:
- Open Terminal.
- Type in the following command and hit Enter to edit /etc/profile as root.sudo nano /etc/profile
- Enter your password and press Enter.
- Tap on the down arrow to move the cursor to the line under "# System-wide .profile for sh(1)".
- Copy and paste the text below to the line.export BASH_SILENCE_DEPRECATION_WARNING=1
- Press Control + X, then type "y" to confirm the change.
- Press Enter to exit nano.
- Close Terminal.
- Restart your Mac.
Way 3: Switch to the bash shipped by Homebrew
If you want to use a newer bash and get rid of 'The default interactive shell is now zsh.' on Monterey/Big Sur/Catalina, you can switch to the bash that comes with Homebrew, which doesn't have the code included in Apple's bash to show the warning. After installing Homebrew on Mac, you can use bash in Homebrew, then update to the latest bash(currently 5.1.16).
How to remove "The default interactive shell is now zsh." on Catalina/Big Sur/Monterey by updating bash:
- Open Terminal.
- Type in the command below and hit Enter to install Xcode.xcode-select --install
- Click Install to confirm the installation.
- Wait for it to complete.
- Input the following command in Terminal and press Enter to install Homebrew./bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- It may take a while for Homebrew to install and update.
- If you receive a warning that /opt/homebrew/bin is not in your PATH, copy and paste the command Homebrew suggests and hit Enter to add Homebrew to your PATH.
- Run the command below to update bash:brew update && brew install bash && sudo chsh -s /usr/local/bin/bash $(whoami)
This post explains bin files on Mac and the usr/local/bin folder. Plus, it guides you on how to access usr/local/bin on Mac in Finder or Terminal.
Which solution did you choose? Click the button below to share this post with your friends!
bash vs. zsh for Mac
Like bash, zsh also derives from the "Bourne" family of shells, so they look similar out of the box. But zsh is more customizable and expandable than bash as you can add new functionalities easily on it and have more choices of plugins.
Zsh is designed to improve user interaction. Therefore, it has many features that either don't exist on bash or work less efficiently on bash, such as autocompletion, syntax highlighting, autocorrection, floating-point arithmetic, and many more. However, bash has the advantage of being the default shell of most Linux machines and servers, for which it is still widely used by programmers.
If you are an average Mac user who uses Terminal once in a while, you can either ignore the message or change shell to zsh as Apple advised. If you work with different platforms where bash is the common shell, you should consider getting an updated bash with Homebrew. If you fall in between, you can suppress the warning and continue using the familiar bash.