Erlang is a programming language used to build massively scalable soft real-time systems with requirements on high availability. Erlang runtime system has built-in support for concurrency, distribution and fault tolerance. This tutorial will help you to install erlang on Fedora 28/27/26/25/24 operating system.
Step 1 – Install Erlang on Fedora
Erlang is available under the default repositories. You can simply install erlang package on your system run running the following command. This will install other required libraries as well.
sudo dnf install erlang
Step 2 – Check Erlang Version
Type erl on the terminal. This will open Erlang shell and show you the version.
Erlang/OTP 20 [erts-188.8.131.52] [source] [64-bit] [smp:3:3] [ds:3:3:10] [async-threads:10] [hipe] [kernel-poll:false] Eshell V184.108.40.206 (abort with ^G) 1>
Press CTRL + C twice to exit from the Erlang shell.
Step 3 – Erlang Hello World Program
Let’s start with hello world program on erlang. First create file helloworld.erl with following content.
add the following contnet.
% hello world program -module(helloworld). -export([start/0]). start() -> io:fwrite("Hello World!\n").
Now compile the hello world program using below command.
The above command will create a file helloworld.beam in the current directory. You can run your program now.
erl -noshell -s helloworld start -s init stop Hello World!