Install Erlang on Ubuntu
APT on Debian/Ubuntu
Debian and Ubuntu carry Erlang in their own repositories as the erlang metapackage: the runtime, the standard libraries and the OTP applications this course uses. Update the package lists and install it.
sudo apt update
sudo apt install erlang
The metapackage also pulls the graphical tools. On a server, install erlang-nox instead: it is the same runtime without them.
sudo apt install erlang-nox
Verify the install
The shell is the program erl. Ask it for the version: the answer names the emulator and its version, which belongs to the OTP release that the package manager installed.
erl -version
Erlang (SMP,ASYNC_THREADS) (BEAM) emulator version 15.2.7.14
Ask the runtime for the OTP release number itself:
erl -noshell -eval 'io:format("~s~n", [erlang:system_info(otp_release)]), halt().'
27
Both answers were measured on Erlang/OTP 27; an older Ubuntu package prints its own, lower numbers.
If erl is not found, close the terminal, open a new one, and try again.
Erlang and Elixir
Elixir is a language that compiles to the
same BEAM bytecode and runs on the same virtual machine, the same
libraries and the same error handling. It adds a Ruby-like syntax and
metaprogramming macros on the same foundation.
On Debian and Ubuntu the elixir package depends on the Erlang runtime,
so the install above is already its prerequisite. The
Elixir course takes it from there.
Article author: Arthur Isaev