Install Elixir
| Install on Linux | |
| elixir --version | |
| Verify Erlang too | |
| Keep Elixir updated |
Install on Linux
Open a terminal and install the elixir package with the system package manager. On Debian and Ubuntu the APT manager carries an Elixir build that is good enough for this course.
After the install finishes, move on to the version check below.
sudo apt update
sudo apt install elixir
elixir --version
A fresh install should answer with its version number.
elixir --version
Erlang/OTP 27 [erts-15.2] [64-bit]
Elixir 1.18.2 (compiled with Erlang/OTP 27)
If the command is not found, close the terminal, open a new one, and try again.
Verify Erlang too
Elixir runs on top of Erlang, so confirm that the runtime answers as well. This one line program asks the runtime for its release number:
elixir -e "IO.puts(:erlang.system_info(:otp_release))"
27
If you see a number like 27, the Erlang side works and you are ready for the next lesson.
Keep Elixir updated
To upgrade later, refresh the package lists and upgrade the elixir package. Then check the version once more to confirm the new build.
sudo apt update
sudo apt upgrade elixir
elixir --version
Next: iex: the interactive shell
Article author: Arthur Isaev