Running Elixir

In this book, I show a terminal session like this:

 $ ​​echo​​ ​​Hello,​​ ​​World
 Hello, World

The terminal prompt is the dollar sign, and the stuff you type follows. (On your system, the prompt will likely be different.) Output from the system is shown without highlighting.

iex—Interactive Elixir

To test that your Elixir installation was successful, let’s start an interactive Elixir session. At your regular shell prompt, type iex.

 $ iex
 Erlang/OTP 18 [erts-7.1] [source] [64-bit] [smp:4:4] [async-threads:10]
  [hipe] [kernel-poll:false] [dtrace]
 Interactive Elixir (x.y.z) - press Ctrl+C to exit (type h() ENTER for help)
 iex(1)>

(The various version numbers you see will likely be different—I won’t bother to show them ...

Get Programming Elixir 1.3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.