Apple - Why does iterm2 close new sessions immediately?
The default shell was a command
shell without command, not a login shell
.
Solution:
iTerm->Preferences->Profiles->General->Command
Set radio button to Login shell
For some others go to iTerm > Preferences > Profiles > General > Command.
If the radio button is ‘Login shell’ change the radio button to ‘Command’ and enter
/bin/bash -l
Should look something like this: