By default, if I invoke emacs from terminal by typing $ emacs C:\users a directory-like environment opens. Then if I do M-x eshell, an eshell environment opens at this path.

My question is how to directly go to this eshell from the initial terminal. I tried $ emacs C:\users eshell and $ emacs C:\users M-x eshell but they don't work.

Added: As an application of the below solution of abo-abo, on Microsoft OS, if at the path bar of your window directory, you type emacs -f eshell, an eshell will be opened at that directory:

enter image description here

1 Answer 1


Like this:

emacs C:\users -f eshell 
  • Perfect thank you. Just by curiosity what is -f? Abbreviated of what?
    – Name
    Commented Jan 4, 2015 at 18:48
  • 2
    Call function, probably. It should be in emacs --help.
    – abo-abo
    Commented Jan 4, 2015 at 18:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.