Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

zsh crashing system

I noticed in terminal, since updating to Catalina, that my bash shells should be updated to zsh.


I executed the advised command chsh .....


After I shut down my bash terminals and re-opened them as zsh terminals my MacBook Pro (2015) froze and then re-booted.


After rebooting the fans on the MacBook pro were running hard for a while so I opened the terminal windows and had a look at 'top' but buy this point the fans had quietened down and nothing looked liked it was consuming a lot of processor resources.


15 seconds later, after switching desktops back to the desktop I use for terminals I had another system freeze


Any thoughts.


I have reverted back to bash


MacBook Pro 15", macOS 10.15

Posted on Oct 31, 2019 7:56 AM

Reply
Question marked as Best reply

Posted on Oct 31, 2019 9:33 AM

I'm not sure how that reply is helpful.


Since my user account migrated from before the Catalina upgrade it continues to use bash - Only accounts created after the upgrade to Catalina use the default shell, zsh.


The document referred to discusses how to change shells to zsh in earlier (compared to Catalina) versions of OSX


Starting with macOS Catalina, your Mac uses zsh as the default login shell and interactive shell. You can make zsh the default in earlier versions of macOS as well.


I don't want to do that, I'm already running Catalina so the document isn't applicable. I therefore follow the details given when opening a bash terminal:


The default interactive shell is now zsh.

To update your account to use zsh, please run `chsh -s /bin/zsh`.


I did that and the system crashed. Twice.


Since then I have used the method listed in the referenced document, using System Preferences/Users and Groups and changed the shell there.


This doesn't seem to have caused any problems since doing so, but the instructions are misleading, so it looks like using the System Preferences method does something extra and above using the chsh method.


Therefore the instructions from Apple were wrong in my case - I'm sure others have used chsh without problem, or my system crashes were a coincidence - Unlikely in my opinion - I've _never_ had my MacBook crash like that before. Maybe once in its entire lifetime I've had to power off. Twice within a few minutes and the system re-booting itself with an error message is a very new experience for me.

Similar questions

11 replies
Question marked as Best reply

Oct 31, 2019 9:33 AM in response to John Galt

I'm not sure how that reply is helpful.


Since my user account migrated from before the Catalina upgrade it continues to use bash - Only accounts created after the upgrade to Catalina use the default shell, zsh.


The document referred to discusses how to change shells to zsh in earlier (compared to Catalina) versions of OSX


Starting with macOS Catalina, your Mac uses zsh as the default login shell and interactive shell. You can make zsh the default in earlier versions of macOS as well.


I don't want to do that, I'm already running Catalina so the document isn't applicable. I therefore follow the details given when opening a bash terminal:


The default interactive shell is now zsh.

To update your account to use zsh, please run `chsh -s /bin/zsh`.


I did that and the system crashed. Twice.


Since then I have used the method listed in the referenced document, using System Preferences/Users and Groups and changed the shell there.


This doesn't seem to have caused any problems since doing so, but the instructions are misleading, so it looks like using the System Preferences method does something extra and above using the chsh method.


Therefore the instructions from Apple were wrong in my case - I'm sure others have used chsh without problem, or my system crashes were a coincidence - Unlikely in my opinion - I've _never_ had my MacBook crash like that before. Maybe once in its entire lifetime I've had to power off. Twice within a few minutes and the system re-booting itself with an error message is a very new experience for me.

Oct 31, 2019 8:39 AM in response to John Galt

When you open Terminal (using bash) in Catalina you get the following message:


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.


Just following the instructions by executing chsh -s /bin/zsh


If that's improper then someone should tell Apple.

Oct 31, 2019 9:56 AM in response to SteveMilner

Perhaps you have some latent dot file that zsh is reading that is causing the crash. Most people don’t use the Terminal. Shells are tricky things. I’ve brought down Solaris servers from user space with an error in a shell script.


I expect there would be some sort of evidence of your crash, such as a crash log. I normally advise people to avoid looking at log files, but it sounds like you might be less susceptible than some to freaking out over the system log.


The bash shell is an ancient version. It would probably be a good idea to update to get a modern shell.

Nov 1, 2019 7:51 AM in response to etresoft

Thanks etresoft.


It's happened again today - Once I had to press and hold power button - Second time it rebooted and showed the crash log.


However I never opened a Terminal window and I've had crash free usage until I opened MS Word - Both crashes happened within a couple of minutes of opening Word.


I've reverted back to bash regardless but the crash-log seemed to indicate a problem with the Radeon driver - I think others have been having this issue.



Nov 1, 2019 8:00 AM in response to SteveMilner

Does updating to macOS 10.15.1 resolve your crash issues? Are you using Word v16.30 (or later if available)?


On the bash/zsh issue, Zsh could give a hoot about Bash dot-files or scripts. Zsh expects a ~/.zprofile for Zsh login, and ~/.zshrc for interactive zsh. Bash scripts do not need their shebang changed as Apple left /bin/bash where it was, and in my experience, these run just as well as the newly created Zsh scripts in Catalina 10.15.1.

Nov 1, 2019 9:18 AM in response to VikingOSX

VikingOSX wrote:

On the bash/zsh issue, Zsh could give a hoot about Bash dot-files or scripts. Zsh expects a ~/.zprofile for Zsh login, and ~/.zshrc for interactive zsh. Bash scripts do not need their shebang changed as Apple left /bin/bash where it was, and in my experience, these run just as well as the newly created Zsh scripts in Catalina 10.15.1.

My suspicion is that the OP had used zsh at some point (maybe via home brew or similar) and tried some funky shell trick that no longer works. Or perhaps one of those tools corrupted the zsh environment in some other way. That is the most common explanation for such things.

Dec 10, 2019 7:41 AM in response to etresoft

Just as an update the issue is relted to general crashes in Catalina. I have resolved my crashing by PRAM/SMC reset. This was suggested on an article I read on Microsoft.


The issues were related to highlighting text in MSWord and some failure with the Radeon driver of card configuration.


Others are having significant problems when attached to external monitors and the system sleeping. Others are just having problems with crashes seemingly unrelated.


It was not connected to zsh, nor the use of chsh, which is still advocated by the OS when opening a bash terminal.


zsh crashing system

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.