Station 00 · SetupOpen the adventure map
Set up your tools
Pick your computer. Install Erlang and Elixir. Mix arrives with Elixir.
[Prerequisite diagnostic] Why can this computer not find Erlang, Elixir, or Mix: is a tool missing, are the versions incompatible, or is PATH stale?
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.
- The result of
erl -s erlang haltin old and newly opened terminals - The complete output of
elixir --versionandmix --version - Whether the install directory is in the current PATH, plus the version pair in the official compatibility table
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.
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
- 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
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.
Install with Homebrew
First run brew --version in Terminal. If brew is missing, follow the Homebrew website to install it, then come back here.
- Open the Terminal app.
- Install Elixir. Homebrew will install Erlang as a dependency.
- Close Terminal and open a new window.
- Run the three version commands to make sure Mix is ready too.
# 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 --versionHomebrew handles the dependencies. If it reports an existing version, read the whole message before removing any old folder.
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.
- Open a terminal and first confirm that you use Ubuntu.
- Download the official script and install a compatible pair of Erlang and Elixir versions.
- Add both command folders to the current terminal, then check the versions.
- On Debian, check the official repository versions first. On Fedora, Arch, and other systems, choose the matching commands from the Elixir installation page.
# 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 --versionEach 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.
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.
- Choose the 64-bit Windows Installer on the Erlang downloads page, download it, and run it.
- Open a new PowerShell window, run
erl -s erlang halt, and note the OTP major version. - On the Elixir installation page, choose the Windows Installer that matches that OTP major version.
- When installation finishes, close PowerShell and open a new window for the checks.
# 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.batDo 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.
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.
# 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)Give the tools a quick checkup
All three systems do the same job: check Erlang, Elixir, and Mix, then ask Mix to list its tasks.
- 01
Open a new terminal or PowerShell window so you do not keep the old PATH from before installation
- 02
Run the Erlang check and note the OTP major version
- 03
Run
elixir --versionandmix --version - 04
Run
mix helpand make sure you see a list of Mix tasks
# These commands work on macOS, Linux, and Windows PowerShell
erl -s erlang halt
elixir --version
mix --version
mix help- 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
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.
This computer can find Erlang, Elixir, and Mix, so the three tools are ready for local practice.
Version commands cannot prove that every third-party dependency is compatible or that every future project will compile at once.
Key ideas in this code
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.
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.
Mix
The project tool included with Elixir. Installing Elixir gives you the mix command, so there is no third installer to find.
Design patterns used here
Health Check
Use three version commands to confirm that every required tool can start.
Fail Fast
Stop before project work when a tool is missing or the version pair fails.
After installing Elixir, how do you install Mix?
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.
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
Remember three things
- 1
Run only the steps for your operating system.
- 2
Start with a compatible Erlang/OTP. An installer, script, or package manager can handle it. Mix arrives with Elixir.
- 3
When a command is missing, reopen the terminal, then check PATH and the official guide.