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


  • terminal works fine.
  • I've tried to rename .bashrc and relaunch iterm, but the problem persists.
  • 1
    When you say "no luck", do you mean you are unable to rename .bashrc, or that when you do, the problem persists? If it is the second, have you relaunched iTerm2 or rebooted since renaming .bashrc?
    – Daniel
    Jan 31, 2012 at 12:12
  • Clarified the question - I meant that the renaming did not help. I will try to reboot now.
    – Adam Matan
    Jan 31, 2012 at 13:19
  • Isn't there a setting you can uncheck to leave the briefly active session open?
    – Pysis
    Mar 1, 2017 at 18:48

3 Answers 3


The default shell was a command shell without command, not a login shell.



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:

  • just worked for me on 3.0.12
    – Rob Davies
    Dec 10, 2016 at 22:16
  • nice.. glad I was helpful
    – Vivek
    Dec 11, 2016 at 10:26
  • I had an enterprise configured machine which configured shell as /bin/false, so setting this fixed the non-startable iTerm. The -l helped make sure the start up scripts were loaded as a login.
    – wrlee
    Jul 23, 2019 at 7:15

Given the error message, you are trying to assign some value to the argpath variable, but you have a space after the = -- no spaces allowed there.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .