Station 00 · SetupOpen the adventure map
00Set up your toolsSetup01The starting lineSetup02Processes and mailboxesR1An Elixir data pipelineOptional reviewR2Read ErlangOptional review03Messages and timeouts04OTP rules for messages05A supervision tree that restarts06Put a limit on concurrency07When a BEAM node disappearsX1Agree on shared BEAM termsBilingual extensionX2Two-language partnersBilingual extension08A reliable job runner
Home/BEAM mainline/Station 00
00
SetupNo experience neededSetupErlangElixirMix

Set up your tools

Pick your computer. Install Erlang and Elixir. Mix arrives with Elixir.

3checkpoints
About 20–40 minutessplit it into sessions
QUESTION · ONE PROBLEM FOR THIS STATION

[Prerequisite diagnostic] Why can this computer not find Erlang, Elixir, or Mix: is a tool missing, are the versions incompatible, or is PATH stale?

Start at the scene

The three commands did not arrive together

A learner followed an old guide. erl works, but elixir or mix cannot be found. On another computer all three commands exist, but OTP and Elixir are incompatible. Diagnose the toolchain before touching project code.

Evidence you can observe
  • The result of erl -s erlang halt in old and newly opened terminals
  • The complete output of elixir --version and mix --version
  • Whether the install directory is in the current PATH, plus the version pair in the official compatibility table
Why this station matters

The problem it solves

The code ahead needs these tools to run. If the terminal cannot find a command, the problem has not reached your code yet. Set up the tools first, then head to the starting line.

After this station

You will be able to

  • Find the installation steps for your computer

  • Check Erlang, Elixir, and Mix separately

  • Know that Mix comes with Elixir and needs no separate download

  • When a command is missing, reopen the terminal and check PATH first

Before you start
  • Know whether your computer uses macOS, Linux, or Windows
  • Keep an internet connection and allow time for the downloads
  • If the system asks for an administrator password, check with a parent, teacher, or computer administrator first
Install for your system

Follow only the path for your computer

Use only the section that matches your computer. Do not run all three sets of commands. After an installer or package manager finishes, reopen the terminal before checking. With the official Ubuntu script, check the current terminal first and then save both PATH entries.

macOS

Install with Homebrew

First run brew --version in Terminal. If brew is missing, follow the Homebrew website to install it, then come back here.

  1. Open the Terminal app.
  2. Install Elixir. Homebrew will install Erlang as a dependency.
  3. Close Terminal and open a new window.
  4. Run the three version commands to make sure Mix is ready too.
Install and check on macOS
# Run this only in a macOS terminal
brew install elixir

# Erlang is installed as a dependency; Mix comes with Elixir
erl -s erlang halt
elixir --version
mix --version

Homebrew handles the dependencies. If it reports an existing version, read the whole message before removing any old folder.

Linux

Use the official script on Ubuntu

Linux has many distributions. The commands below show the current Ubuntu pairing from the Elixir website. If its version numbers have changed, use the newer pair from the official page.

  1. Open a terminal and first confirm that you use Ubuntu.
  2. Download the official script and install a compatible pair of Erlang and Elixir versions.
  3. Add both command folders to the current terminal, then check the versions.
  4. On Debian, check the official repository versions first. On Fedora, Arch, and other systems, choose the matching commands from the Elixir installation page.
Install and check on Ubuntu
# Run only on Ubuntu; first check the version pair on the official page
curl -fsSO https://elixir-lang.org/install.sh
sh install.sh elixir@1.20.2 otp@28.4

# These two PATH lines let the current terminal find the new tools
installs_dir=$HOME/.elixir-install/installs
export PATH=$installs_dir/otp/28.4/bin:$PATH
export PATH=$installs_dir/elixir/1.20.2-otp-28/bin:$PATH

# Erlang, Elixir, and Mix should all respond
erl -s erlang halt
elixir --version
mix --version

Each export line affects only the current terminal. After the checks work, add both lines to your shell configuration. A distribution repository may have Erlang and Elixir versions that are a few releases behind the official page. That is fine for a first try. If a lesson or project needs an exact version, use the official script above or choose a version manager from the Elixir page. Do not mix the script, system packages, and a version manager in one installation.

Windows

Use the two official installers

Install Erlang/OTP first. Then choose an Elixir installer that matches that OTP major version on the official Elixir page.

  1. Choose the 64-bit Windows Installer on the Erlang downloads page, download it, and run it.
  2. Open a new PowerShell window, run erl -s erlang halt, and note the OTP major version.
  3. On the Elixir installation page, choose the Windows Installer that matches that OTP major version.
  4. When installation finishes, close PowerShell and open a new window for the checks.
Check the Windows installation
# After installation, run these in a new PowerShell window
erl -s erlang halt
elixir --version
mix --version

# PowerShell has another command named iex; use this to open Elixir's IEx
iex.bat

Do not choose versions only because their numbers are largest. The Windows installation page lists compatible pairs. If you already use Scoop, you can also follow the official page to install erlang and elixir separately.

One job, two ways to write it

See what it does before how it is written

If both shells answer, the runtime is awake. In Windows PowerShell, use iex.bat to open Elixir's IEx.

Current code
Elixir
# Run this in IEx after installation
# Ask Elixir to print a line
IO.puts("Elixir is running")

# Check Elixir's own version
System.version()

# Elixir can also ask the Erlang/OTP layer below it
:erlang.system_info(:otp_release)
LAB
Hands on

Give the tools a quick checkup

About 15–25 minutes

All three systems do the same job: check Erlang, Elixir, and Mix, then ask Mix to list its tasks.

  1. 01

    Open a new terminal or PowerShell window so you do not keep the old PATH from before installation

  2. 02

    Run the Erlang check and note the OTP major version

  3. 03

    Run elixir --version and mix --version

  4. 04

    Run mix help and make sure you see a list of Mix tasks

Copy into the terminal and press Enter
# These commands work on macOS, Linux, and Windows PowerShell
erl -s erlang halt
elixir --version
mix --version
mix help
What you should see
  • The Erlang command prints the OTP major version
  • The Elixir version information also shows the Erlang/OTP version it uses
  • Mix shows its version and a list of tasks it can run
Break it on purpose

Try the checks in a terminal that stayed open throughout installation, then try a newly opened terminal. If the results differ, the old terminal probably has not reloaded PATH.

What this shows

This computer can find Erlang, Elixir, and Mix, so the three tools are ready for local practice.

What this does not show yet

Version commands cannot prove that every third-party dependency is compatible or that every future project will compile at once.

Meet the words

Key ideas in this code

01

PATH

A list of folders the terminal searches for commands. If a tool is installed but still cannot be found, PATH is often the place to check.

02

Compatible versions

Elixir needs a compatible Erlang/OTP version. Do not simply choose the biggest version number. Check the compatibility notes on the official installation page.

03

Mix

The project tool included with Elixir. Installing Elixir gives you the mix command, so there is no third installer to find.

Name the shape in the code

Design patterns used here

01

Health Check

Use three version commands to confirm that every required tool can start.

02

Fail Fast

Stop before project work when a tool is missing or the version pair fails.

Think it through

After installing Elixir, how do you install Mix?

Your turn

Make an installation check sheet

Write down your operating system and the OTP, Elixir, and Mix versions. Then record the first two things to try when a command cannot be found.

Hint 1Take the first step

Put the output from the three version commands together. You do not need to copy every pair of parentheses.

Hint 2Make it a little smaller

The first step can be closing the terminal and opening a new window.

Hint 3You are close

For the second step, check PATH or return to the official installation page. Do not download a random tool with the same name.

Hint 4Work backward from the finish

Choose one success signal and write the smallest test for it. If the computer cannot show the result, rewrite the signal as something you can truly observe.

Ready to move on when
  • State whether the computer uses macOS, Linux, or Windows

  • Record the OTP, Elixir, and Mix versions

  • Explain why Mix needs no separate installation

  • Know to ask a parent, teacher, or computer administrator when a permission problem appears

Take these with you

Remember three things

  1. 1

    Run only the steps for your operating system.

  2. 2

    Start with a compatible Erlang/OTP. An installer, script, or package manager can handle it. Mix arrives with Elixir.

  3. 3

    When a command is missing, reopen the terminal, then check PATH and the official guide.

Read a little more

Visit the original sources

Official Elixir installation guideOfficial Erlang/OTP downloadsOfficial introduction to Mix
Station completeYou ran the experiment and thought through the answer. Save this station.