How to silence the warning - The default interactive shell is now zsh on macOS


As you must have noticed that whenever you move your default interactive shell on your macOS Terminal application from the zsh shell to bash, you get the below warning message every time you do it,

% bash

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.

bash-3.2$


Steps to silence the warning message: "The default interactive shell is now zsh"

  1. Open Terminal App,

  2. Type: nano ~/.bash_profile

  3. Copy: export BASH_SILENCE_DEPRECATION_WARNING=1 (append as new line if it already has some configuration text) the below lines in the file

  4. Press Control + X to save to file. Press Y and press Return key to save and exit.

  5. Now type: source ./bash_profile

  6. As you will move to bash shell now you will not get the warning.

bash profile
Advertisements
Try Out Code2care Dev Tools:

Advertisements

Advertisements
Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and software developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include learnings, tutorials, trouble-shooting steps, video tutorials, code snippets, how-to, blogs, articles, etc.

🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.