TIDE
Languages

Erlang

Installing Erlang on Ubuntu in TIDE

Erlang

Erlang is a functional programming language built for concurrency, high availability, and fault tolerance. Developed by Ericsson, it powers the BEAM virtual machine and is widely used for distributed systems, telecom applications, and real-time messaging systems like WhatsApp.

Installation

You can install Erlang/OTP along with rebar3 (the standard Erlang build tool) directly via apt.

Using Standard APT

apt update
apt install -y erlang rebar3

Using Erlang Solutions Repository (Latest OTP Releases)

If your project requires the latest Erlang/OTP release, add the official Erlang Solutions repository:

apt update
apt install -y curl software-properties-common lsb-release
curl -fsSL https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc | gpg --dearmor -o /usr/share/keyrings/erlang-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/erlang-archive-keyring.gpg] https://packages.erlang-solutions.com/ubuntu $(lsb_release -cs) contrib" > /etc/apt/sources.list.d/erlang.list
apt update
apt install -y erlang

Verification

Check the installed Erlang/OTP release version:

erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell

Writing and Running Code

Create an Erlang source file named hello.erl:

-module(hello).
-export([start/0]).

start() ->
    io:format("Hello from Erlang in TIDE!~n").

Compiling and Executing

  1. Compile the Erlang module into a .beam bytecode file using the Erlang compiler (erlc):
erlc hello.erl
  1. Execute the compiled module using the erl runner:
erl -noshell -s hello start -s init stop

Interactive Shell (REPL)

Start the interactive Erlang shell:

erl

To exit the Erlang shell, press Ctrl+G followed by q, or type q(). and press Enter.

Official Resources

On this page