14

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.
  • 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 '12 at 12:12
  • Clarified the question - I meant that the renaming did not help. I will try to reboot now. – Adam Matan Jan 31 '12 at 13:19
  • Isn't there a setting you can uncheck to leave the briefly active session open? – Pysis Mar 1 '17 at 18:48
12

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

9

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 '16 at 22:16
  • nice.. glad I was helpful – Vivek Dec 11 '16 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 at 7:15
1

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 .