Why does iterm2 close new sessions immediately

bashiterm

I've made some changes to my .bashrc file in my new MacBook, mainly aliases for common commands.

Shortly after, iterm2 immediately closes every new session or tab with the following cryptic message:

## exec failed ##
argpath= error=No such file or directory

Notes:

  • terminal works fine.
  • I've tried to rename .bashrc and relaunch iterm, but the problem persists.

Best Answer

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