Elixir basics · Lesson 01 (open contents)
01 · Open IEx, then exit02 · Let the code speak03 · Meet six kinds of values04 · Put values together05 · Build a new list06 · Make the shapes match07 · Choose with case08 · Parse a number safely09 · Unpack &1 and the pipe10 · Put code in a project11 · Ask precise true-or-false questions12 · Read and update nested data13 · Count visible text and bytes14 · Let function clauses choose15 · Solve a list twice16 · Choose the smallest clear control form17 · Give domain data a shape18 · Put one tested module in Mix19 · Make success and failure predictable20 · Read and write one real file21 · Take only the data you need22 · Give different data one shared action23 · Write a callback contract24 · Write down the data contract25 · Test behavior and boundaries26 · Turn a project into a command27 · Write the project promise28 · Parse one real line29 · Keep the public API small30 · Make the promise executable31 · Package the edge and leave clues32 · Prove the project is done
ELIXIR / 01

Open IEx, then exit

Where do you type Elixir code? How do you exit when you are done?

iex

↑ Type in your terminal, then press Enter

A terminal is a window for entering commands. Running iex starts IEx in that window so you can try Elixir code.

The IEx prompt (version information omitted)
iex(1)>← IEx is open and waiting for your code

iex(1)> is the prompt: IEx is waiting for your code. Do not type the prompt yourself.

Where is the terminal? What if the command is not found?

On macOS, open Terminal; on Windows, open PowerShell; on Linux, open your terminal application.

If you see command not found or ‘not recognized’, the terminal cannot find the startup command. You have not entered IEx yet.

Check installation and setup →
Want to go deeper?

How do I install Elixir and check my setup?

What other ways can I exit IEx? (Official documentation)