Home > System Tutorial > MAC > The Default Interactive Shell Is Now Zsh: How to Remove It on Mac?

The Default Interactive Shell Is Now Zsh: How to Remove It on Mac?

Jennifer Aniston
Release: 2025-03-03 09:14:17
Original
888 people have browsed it

macOS default shell switched to Zsh: Complete Guide

When starting your Mac, it may be surprising to see a prompt to switch the default interactive shell from Bash to Zsh. However, this is just one way Apple adapts and develops, aiming to provide users with a better shell experience.

The advantage of macOS is that users do not have to be limited to any particular shell. Whether you are a big fan of Bash or are interested in Zsh, the choice is always in your hands.

This guide will provide you with a clear explanation. We will explain step by step the reason behind this change and, more importantly, we will guide you on how to do so that you can choose the shell with confidence.

The meaning of "default interactive shell is now Zsh"

Warning message "Default interactive shell is now Zsh" indicates that macOS's Terminal has switched from Bash to Zsh. If you don't use Terminal often, don't worry. But for the average user, while this is a noteworthy shift, it hardly changes how you typically interact in Terminal.

Why does this warning message appear?

This warning message is to remind you of the underlying changes in macOS. The main reasons for this warning are as follows:

  • Transition from Bash to Zsh: Apple decided to switch the default Unix shell in its Terminal from Bash to Zsh. This change enhances security and provides updated features such as interactive autocomplete, theme-friendly prompts, and path extensions.
  • User Perception: It ensures that ordinary Terminal users understand the system's default settings, even if the overall user experience remains basically the same.
  • Software Consistency: As the software continues to evolve, such notifications help bridge the gap between the old and current versions.

Is Zsh good for your Mac?

Zsh (also known as Z shell) was built on Bash, which was once the preferred shell for macOS. Given its rich functionality, using Zsh instead of Bash is usually the best choice. To further enhance the experience, we recommend that you introduce a framework for Zsh that customizes how you handle settings, plugins, and appealing themes.

What to do after seeing the message "Default interactive shell is now Zsh"

For some Mac users, encountering this message can be confusing. But, don't worry. Next, we will guide you the steps you can take after seeing this message:

  • How to switch from Zsh to Bash
  • How to switch to Bash using Homebrew
  • How to hide the "default interactive shell is now Zsh" and continue using Bash

How to switch from Zsh to Bash

Luckily, switching between Zsh and Bash is very simple. To switch from Zsh to Bash, type chsh -s /bin/bash in your Terminal. After restarting, the new session will use Bash by default.

The following are the steps to change Zsh to Bash:

  1. Open the Apple Menu and select System Preferences.
  2. Navigate to "Users and Groups".
  3. Right-click on your username and select Advanced Options.
  4. If prompted, please enter your password and confirm.
  5. Find the "Login shell" drop-down menu and select /bin/bash.
  6. Press OK and turn off System Preferences.

The Default Interactive Shell Is Now Zsh: How to Remove It on Mac?

The Default Interactive Shell Is Now Zsh: How to Remove It on Mac?

How to switch to Bash using Homebrew

To switch to a new shell (such as Bin/Bash), add its name to the shell file and save it. This step ensures that your computer knows that you can use the shell. You can think of it as a safety net to prevent you from accidentally selecting content that may cause problems.

The following are detailed instructions for switching Zsh to Bash using Homebrew:

  1. Start Terminal.
  2. Enter xcode-select --install and press Enter. When prompted, click Install and wait patiently for the process to complete.
  3. To start the Homebrew installation, enter /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" and press Enter. This may take some time, please wait.
  4. If you receive a warning /opt/homebrew/bin is not in your PATH, please copy its recommended commands and paste them into Terminal as recommended by Homebrew. Use Enter to confirm.
  5. Finally, run brew update && brew install bash && sudo chsh -s /usr/local/bin/bash $(whoami) to update and build your new Bash shell.

Using Homebrew (the popular package manager for macOS), you can easily install newer versions of bash and set it as your default shell.

The Default Interactive Shell Is Now Zsh: How to Remove It on Mac?

How to hide the "default interactive shell is now Zsh" and continue using Bash

For those who appreciate Zsh's advanced features but are still loyal to Bash, there is a way to mute the default shell notifications. After integrating a specific code snippet (export BASH_SILENCE_DEPRECATION_WARNING=1) into a configuration file (e.g. ~/.bash_profile, ~/.profile, or ~/.bashrc), you can easily use Bash instead of Zsh on your Mac.

The following are the steps to cancel the warning and continue using Bash in logical order:

  1. Start Terminal on your Mac.
  2. To mute the notification, type and execute the following command: touch ~/.bash_profile && echo "export BASH_SILENCE_DEPRECATION_WARNING=1" >> ~/.bash_profile.
  3. If the warning still exists, you may need to adjust another configuration file. Simply replace ~/.bash_profile with ~/.profile or ~/.bashrc in the command and run it again.

The Default Interactive Shell Is Now Zsh: How to Remove It on Mac?

Summary

Switching between Zsh and Bash can feel a little overwhelmed at first. So our team explores how to mute annoying notifications and makes some tweaks to adopt the shell of your choice.

However, there are more broad aspects here. In addition to updates and settings, it is important to keep your Mac continuously maintained. This is where MacKeeper's memory cleaner comes into play. By managing your Mac's memory and saying goodbye to time-consuming processes, you can not only fix the issues, but also prevent new issues.

If you find this guide helpful, don't forget to check out our other expert guide on Zsh denied permission on Mac and checking the health of SSD on Mac for more insights and solutions.

The above is the detailed content of The Default Interactive Shell Is Now Zsh: How to Remove It on Mac?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template