Hello World in Wolfram Language

Our first program will print the classic “hello world” message. Here’s the full source code.

Print["hello world"]

To run the program, open the Wolfram Language environment and evaluate the command.

Print["hello world"]

Sometimes we’ll want to create scripts and run them from a file. We can do this by saving the code in a file with the .wl extension and then executing it using the wolframscript command-line tool.

First, save the code to a file named hello-world.wl:

Print["hello world"]

Then, run the script from the command line:

$ wolframscript -file hello-world.wl
hello world

Now that we can run and build basic Wolfram Language scripts, let’s learn more about the language.