Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to run some Mathematica programs on a remote computer running the Windows XP operating system. However, I do not know how to run the program using the command line on this system.

What do I need to do in order to run Mathematica code remotely on Windows XP?

share|improve this question
Thank you. But this link does not include the way on windows. I know how to do on Linux. – wxg Oct 15 '12 at 2:57
up vote 13 down vote accepted

As indicated in the documentation, one can access the Mathematica kernel from the command prompt using the command math in Unix/Linux and MathKernel from Mac OS X/ Windows.

If the MathKernel command is not in your PATH variable, you can try one of several things:

  1. Enter the full pathname as part of the command
  2. Add MathKernel as a PATH variable using the instructions appropriate to your version of Windows. This will generally involve (a) right-clicking on the My Computer icon from the desktop and choosing Properties, then (b) clicking on a tab or button with the word Advanced in its label (it’s the Advanced System Settings link in Vista and later), and then (c) choosing the Environment Variables option.

  3. Using the command prompt, navigate to the directory in Windows that stores the Mathematica kernel executable, as described in this page in the Mathematica documentation.

This documentation page collects all the relevant commands together.

There are several relevant tutorials in the documentation, including on use of the text-based interface and a listing of command-line options and environment variables.

share|improve this answer
I have tried MathKernel in cmd on Windows. But it said thtat something like "MatheKernel is not a command". How to install the command? – wxg Oct 15 '12 at 4:39
@wxg MathKernel is not in your PATH variable. Enter the full path name and it will work. – Ajasja Oct 15 '12 at 5:49
@Ajasja I have tried as you suggested. Can you tell me how to add MathKernel in the PATH variables? So I can simplely use MathKernel. – wxg Oct 15 '12 at 6:37
@wxg here you go: also you have to restart cmd so that the changes will take effect. – Ajasja Oct 15 '12 at 7:51
As of September 2015, a number of the links to Wolfram pages are no longer valid. I tried to find the correct links to update the answer, but failed miserably. – bobthechemist Sep 2 '15 at 15:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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