I installed emacs packages from MobaXterm. When I'm in MobaXterm terminal I could run any Cygwin commands e.g. 'ls' or 'which' but when I start Emacs and call the shell it does not recognize any of unix command.

sh-4.1$ ls
sh: ls: command not found
sh-4.1$ pwd
sh-4.1$ ls
sh: ls: command not found
sh-4.1$ which pwd
sh: which: command not found

Obviously I messed with settings but could someone help to resolve it?

  • Are you actually running a Cygwin build of Emacs?
    – phils
    Sep 9, 2022 at 2:38
  • If "MobaXterm" is not something inherently to do with Cygwin, are you starting Emacs from that terminal/shell?
    – phils
    Sep 9, 2022 at 2:40
  • sorry, my fault .. it's not emacsclient. I did not install Cygwin because I think that MobaXterm is using Cygwin itself. Note: in MobaXterm terminal it uses all Cygwin utilities and commands. My issue is that when I start Emacs ( I installed it as a package from MobaXterm) and open Emacs shell and want to run any unix-like command e.g. 'ls' it doesn't work. Hence my issue is only with Emacs and only related to unix-like commands from the shell
    – susja
    Sep 9, 2022 at 15:03
  • I've edited tags for you to remove emacsclient -- but that's something you could have done yourself. If you know you can improve the question, go ahead and edit it.
    – phils
    Sep 10, 2022 at 2:47
  • I still can't tell whether you're running emacs from inside the mobaxterm terminal/shell session, either. You didn't really answer that question. If not, does doing that make a difference?
    – phils
    Sep 10, 2022 at 2:49

1 Answer 1


Folks Sorry not being clear how I started EMacs. I started it from inside of MobaXterm. I figured out that I installed different versions of Emacs packages into MobaXterm. A few of it has the issues with prompt while others don’t have it
Hence I was able to create a shortcut to “good” one and I am all set now Thanks for trying to help

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.