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 20 [erts-9.1] [source] [64-bit] [smp:4:4] [ds:4:4:10]
  [async-threads:10] [hipe] [kernel-poll:false]h
 Interactive Elixir (x.y.z) - press Ctrl+C to exit (type h() ENTER for h
 elp)
 iex(1)>

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

Get Programming Elixir ≥ 1.6 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.