Why do I keep getting a terminal error about the zsh shell?
What can happen to my computer if it does not like the zsh shell
MacBook Pro 13″, macOS 12.6
What can happen to my computer if it does not like the zsh shell
MacBook Pro 13″, macOS 12.6
I can guess what's going on.
There are several command line interpreters ("shells") that you can run on Unix and Linux systems. Among them are sh ("shell"), csh ("C shell"), bash ("Bourne Again shell"), and zsh.
Apple once chose bash to be the default shell. After a while they stopped including the latest versions of bash in macOS. Then they made zsh the new default shell. I read somewhere that newer versions of bash fell under a GPLv3 license and that Apple never shipped macOS with a version of bash that fell under that license. (Read into that what you will.)
I'm guessing that you once used a version of macOS in which bash was the default shell. When macOS set up your user account, it chose bash to be your shell, and that setting has remained.
The message that you are seeing is Apple trying to "encourage" you to switch to zsh (their new shell of choice). The command
chsh -s /bin/zsh
means "change the default shell for my account to zsh." (/bin/zsh is where zsh lives.)
You can ignore the nagging and keep using Apple's old version of bash. Or you can type the command to start using zsh. If you do enter the suggested command, then next time you run Terminal, I think you'll find that the message has gone away.
I can guess what's going on.
There are several command line interpreters ("shells") that you can run on Unix and Linux systems. Among them are sh ("shell"), csh ("C shell"), bash ("Bourne Again shell"), and zsh.
Apple once chose bash to be the default shell. After a while they stopped including the latest versions of bash in macOS. Then they made zsh the new default shell. I read somewhere that newer versions of bash fell under a GPLv3 license and that Apple never shipped macOS with a version of bash that fell under that license. (Read into that what you will.)
I'm guessing that you once used a version of macOS in which bash was the default shell. When macOS set up your user account, it chose bash to be your shell, and that setting has remained.
The message that you are seeing is Apple trying to "encourage" you to switch to zsh (their new shell of choice). The command
chsh -s /bin/zsh
means "change the default shell for my account to zsh." (/bin/zsh is where zsh lives.)
You can ignore the nagging and keep using Apple's old version of bash. Or you can type the command to start using zsh. If you do enter the suggested command, then next time you run Terminal, I think you'll find that the message has gone away.
You have options:
If you continue to use the ancient Bash shell, no harm will befall you for that decision. You can open the .bash_profile text file in your home directory and add this entry to suppress the chsh line:
BASH_SILENCE_DEPRECATION_WARNING=1
and that chsh -s /bin/zsh notice will disappear on any new Terminal session.
If you do decide to be adventurous and elect to configure the Zsh shell, you will need to run that change shell command:
sudo /usr/bin/chsh -s /bin/zsh
Password:⚿
Note: your administrator password will not echo in the Terminal.
Since the Zsh shell does not read your Bash dot files, you will need to create a minimal Zsh .dot file that has your PATH and PS1 prompt information as a bare minimum. Copy and paste the following into your Terminal after you have performed the above chsh command. After you paste, press return to run the HERE script:
<<"EOF" > ~/.zshrc
export PATH=".:/usr/local/bin:${PATH}"
PS1="%m: %~ %% "
EOF
and to invoke your PATH and PS1 Terminal prompt for the current Terminal window:
source ~/.zshrc
Many people customize their shell initialization scripts. If you have done that, and there are problems with the script, you may get error messages related to that.
But I don't think the computer likes, or dislikes, the zsh shell.
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 Use zsh as the default shell on your Mac - Apple Support
Sadly, I go to the support page and it is a bit confusing for me. And again, if i start messing with that, how will it affect the performance on my computer? Thanks!
I have not seen ANY reports of issues from users who have followed that advice and changed to the shell Apple now prefers.
Later versions of MacOS will install zsh by default, and no longer use bash.
The differences are extremely obscure, and for ordinary users are non-existent.
The problem here is that I would not have customized the shell. I am not that savvy. I just keep getting a terminal error that it needs to be changed...and I am not sure how it will affect my computer if I start messing with the base programming.
Why do I keep getting a terminal error about the zsh shell?