15
$\begingroup$

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?

$\endgroup$
3

1 Answer 1

16
$\begingroup$

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.

$\endgroup$
11
  • $\begingroup$ I have tried MathKernel in cmd on Windows. But it said thtat something like "MatheKernel is not a command". How to install the command? $\endgroup$
    – wxg
    Oct 15, 2012 at 4:39
  • 2
    $\begingroup$ @wxg MathKernel is not in your PATH variable. Enter the full path name and it will work. $\endgroup$
    – Ajasja
    Oct 15, 2012 at 5:49
  • $\begingroup$ @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. $\endgroup$
    – wxg
    Oct 15, 2012 at 6:37
  • 2
    $\begingroup$ 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. $\endgroup$ Sep 2, 2015 at 15:38
  • 1
    $\begingroup$ WolframKernel aka MathKernel page with command line keys lives here $\endgroup$
    – garej
    Nov 30, 2015 at 16:47

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.