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.

Accepted Reply

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.

Replies

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!