Just upgraded from Yosemite to El Capitan, and I started out with an Emacs problem: it wouldn't launch from the Emacs.app icon, complaining that it couldn't find /bin/false. I tracked this down to the fact Emacs.app was trying to run /usr/bin/login, the default for the "Terminal" app. I can switch "Terminal" to run /bin/bash, but that doesn't solve the Emacs.app problem or similar problems for any other apps that try to run /usr/bin/login.

It looks like I need to fix /usr/bin/login to run /usr/bin/false and not /bin/false, but I have no idea how.

I tried to trick the programs backwards,

sudo ln -s /usr/bin/false /bin/false 

and I get "Operation not permitted." I tried

sudo cp /usr/bin/false /bin/false

and I get "Operation mot permitted."

I'm stuck looking for "the right answer" or for other work arounds.

  • 1
    Does terminal normal run /udr/bin/login and if so does it work? Also what does echo $SHELL give?
    – mmmmmm
    Apr 4, 2016 at 22:54
  • 1
    In System Preferences-> Users & Groups. Click on your user name and show advanced options, you will need to click on the padlock first. What is the value of Login Shell?
    – mmmmmm
    Apr 4, 2016 at 22:56
  • @Mark it shows /bin/bash as the default login shell (I bricked the computer by changing it to /usr/bin/false, just now finishing restoration of the OS. Brand new fresh install of Emacs from Laval University still has the same problem -- trying to run /bin/false)
    – Reb.Cabin
    Apr 5, 2016 at 22:22
  • @Mark I just finished a completely fresh reinstall of the OS on a formatted hard drive. echo $SHELL shows /bin/bash. The user default in System Preferences > Users & Groups is /bin/bash. I don't know whether terminal normal runs /usr/bin/login, but if I run /usr/bin/login manually in a terminal, it works. Emacs STILL complains (after completely fresh download and reinstall) that it can't find /bin/false. This doesn't happen on a completely separate El Capitan mac that I own (everything works great on Mac #2, the identical twin to the problem mac ).
    – Reb.Cabin
    Apr 5, 2016 at 22:26
  • 1
    Which emacs? and what is in ~/.emacs and other startup files
    – mmmmmm
    Apr 5, 2016 at 22:34

2 Answers 2


I had the same problem, with emacs giving me "Error (use-package): exec-path-from-shell :init: Searching for program: no such file or directory, /bin/false" on startup. However, I noticed that this only happens when running Emacs (installed from emacsformacosx) from the Dock or Spotlight. If I ran it from my Terminal, or by clicking on it in Applications in finder, it worked fine.

After a restart, the problem was resolved. I suspect that Dock and Spotlight held on to my original default shell, and after a restart, they used the new value (changed from /bin/false to /bin/zsh).

  • 1
    this did not fix it for me Dec 16, 2018 at 21:12

Your emacs shell is incorrectly being directed to /bin/false, which is just a binary that immediately exits, returning false when it's called. To over-write this, copy-paste the following code into your ~/.emacs/init.el file:

(setq explicit-shell-file-name "/bin/sh")
  • this did not fix it for me. Dec 16, 2018 at 21:11

You must log in to answer this question.

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