Big Sur Terminal fails to present a shell

Anyone encountering an issue with Big Sur and the terminal failing to present a shell some reasonably short time after boot?

Initially works no problems, after a while new Terminal windows open fine but the shell never loads and you're left looking at a cursor.
Answered by Bill Standen in 613593022
Found the trigger, it's an iTerm2 thing.

Disable Enable session restoration under Preferences > Advanced > Session, after that you shouldn't have a problem.

Raised an issue with iTerm's developers. Not sure if there's something here on the OS side as well.
same issue here, even tried a reinstall from scratch and having issue once more
Same here. Also happens with iTerm2
Accepted Answer
Found the trigger, it's an iTerm2 thing.

Disable Enable session restoration under Preferences > Advanced > Session, after that you shouldn't have a problem.

Raised an issue with iTerm's developers. Not sure if there's something here on the OS side as well.
Rebooting appears to be the only way to get iTerm & Terminal to work again.

Raised an issue with iTerm's developers. Not sure if there's something here on the OS side as well.

Thank you for raising the issue (Issue #8965 on the iTerm2 Gitlab issue tracker for the curious) with the iTerm2 developers Bill! Feel free to also file a radar through the Feedback Assistant and link to the issue on the iTerm2 tracker in your request, this will get us some more info in case there is anything we need to do on our side.



Thank you for posting this, had and reported the same issue ;)
Note that whenever this occurs, you need to force shutdown the mac. Clicking the "Shutdown..." or "Restart..." menu items will hang the shutdown process on the desktop, after it quits all apps.
Exact same behavior as above @ajh above. Terminal becomes unresponsive, and cannot restart the system. I noticed once I got a popup to log in to an iCloud account.. might be related to a hanging sync service?
Thanks for posting -- will try that

I too saw it with iTerm2.

I was using zsh (from homebrew). Switched to zsh (macOS) and same issue. Was about to switch back to bash to see if it occurs there, but will try this fix first.

When it occurs there's no way out except a reboot . A 'ps' never completes, sudo etc fails - it's pretty fatal. Presumably some kind of resource or ipc issue?


Thanks Bill. Disabling Enable session restoration appears to work for me.
Thank you for posting. Same issue here. iTerm2 loads, but no shell prompt. Similarly, system will not shutdown - a forced shutdown is required, in my case.
Same problem
Thank you so much for this. I even re-installed macOS and was about to downgrade back to 10.15. Thank you so much
The accepted solution is not working for me sadly...
Same issue here... the terminal (iTerm2, Terminal.app, any terminal really) hangs on the "login" command.
Update: I found this happens after the screen is locked. Unlocking the screen apparently has a bug that makes the "login" command hang.
What helped for me is:
  • Install latest iTerm nightly

  • Disable SIP: reboot, Cmnd+R, Utilities->Terminal, csrutil disable && reboot

Yes, I also noticed that the shell is hanging in macOS Big Sur Beta 1 and 2. In macOS Big Sur Beta 2, I was able to resolve this issue by switching from my MacPorts back to the Apple's version of Zsh by doing the following:

1) In Terminal app, changed preferences for Shells Open with to the following:

Code Block
/bin/zsh


Note: The above didn't work for me using macOS Big Sur Beta 1.

2) In the command line, performed the following for consistency:

Code Block
chsh -s /bin/zsh


Well, I wish that this helps both you as well as others get past this issue.

I had this same problem with MacWise and discovered that it is caused by trying to use any other shell except for zsh with Big Sur.
If you try to open a session with tcsh shell, it lets you type and echos characters back to the screen as you type. But if you request data from the shell (just do a simple ls) you get no response.

Then what is really strange is after doing that, run Terminal and you get the exact same symptom.
Rebooting is the only thing that gets you back to normal.

I am the developer for MacWise and have modified the latest version of MacWise to only use the zsh shell and it works with no problem.

I filed a bug report.
The accepted solution is not working for me sadly...
If you haven't already, give iTerm2 full disk access in preferences.
ProductName: macOS
ProductVersion: 11.0
BuildVersion: 20A5354i
iTerm2 Build 3.3.12
Terminal Version 2.11 (438)
HOMEBREW_VERSION: 2.4.14
Running latest Oh My Zsh (omz)

tldr: Terminal -> Preferences -> Profiles -> Shell tab ->
In startup, enable "Run Command"
Command: /usr/local/bin/zsh --login

=============================

iTerm2 works fine. The Terminal.app loads, but I never get to a shell prompt.
Thought it was an omz issue, so I tried an empty .zshrc.
This time, both iTerm2 and Terminal load without errors.
Put some echo statements in ~/.zshrc and $ZSH/oh-my-zsh.sh.
Again, iTerm2 worked without error.
Terminal would process .zshrc, tried to process oh-my-zsh.sh and hang.

Instead of completely debugging oh-my-zsh.sh, I modified Terminal preferences,
see tldr above.

Hi,

I think I found how to resolve this issue. I've updated my Macbook Pro 16" today to Big Sur and I had the same issue. Xcodebuild forced me to force reset my computer.

I have checked my xcode command tools path with xcode-select -p and I found that the path was related to an older version of xcode (10.1 in my case).

I have reinstall xcode command tools (sudo rm -rf /Library/Developer/CommandLineTools and xcode-select --install) and I have switch the xcode-select path with this command sudo xcode-select -switch /Library/Developer/CommandLineTools

My issue is now resolved
I removed my oh-my-zsh and re-installed it, resolved my issue.
BigSur had an update last night and this morning, the terminal would just hang on trying to open. After some time digging into it, my issue was with OhMyZsh. I had to go in and remove the ".oh-my-zsh" folder through Finder and then terminal would load just fine. After which, I reinstalled oh-my-zsh and everything is working again. Very odd, but that's what did it for me.

I hope that helps someone!
Big Sur Terminal fails to present a shell
 
 
Q