When I create a local shell session in MobaXterm with the CMD "terminal shell" selected, the MobaXterm path %USERPROFILE%\Documents\MobaXterm\slash\binis prepended to my full path. This is breaking multiple programs for me, such as Vim, Python, git and ssh. I have these programs installed on my system, and they work correctly from a normal command prompt.

However, since the MobaXterm insists on adding its own path, it forces me to use the ones installed in slash\bin, which do not work correctly.

I have already checked the "Use Windows PATH" box in the session's Terminal Settings. The Windows path is available, but any name collisions resolve to MobaXterm's binaries since it comes first.

There is a related question on Stack Overflow that asks why MobaXterm does this, but I don't care why. I just want to open a local CMD prompt and have it behave the same way as if I had opened cmd.exe.

I am using Personal Edition v9.4 on Windows 10.

How can I make MobaXterm stop prepending its path to the path used in a local CMD session?


In MobaXterm v10.7, there is a line in /etc/profile (which is actually %USERPROFILE%\Documents\MobaXterm\slash\etc\profile) that reads:


Removing this line should accomplish what you want.

(I have no reason to think it is different in v9.4 which you are using.)

  • Thanks for the suggestion, but that didn't seem to work. I noticed that Moba tries to rewrite the profile file on startup, but even after marking the file as read-only and ensuring that that line stays removed after startup, the Moba path is still there. I don't think this file is even used when starting a windows command prompt session. – skrrgwasme Aug 15 '18 at 16:42
  • @skrrgwasme wait, is it in a DOS prompt that you see the modified PATH? – Wildcard Aug 15 '18 at 16:47
  • Yup. I thought I explained that well enough in my question. – skrrgwasme Aug 15 '18 at 17:04

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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