Erlang is a concurrent programming language with a garbage-collected runtime environment designed for concurrency, fault tolerance, and distributed application architectures. Concurrent processes are used to structure Erlang applications. These processes communicate asynchronously by exchanging messages and do not share memory. Erlang processes are small and belong to the language rather than the operating system.Ericsson's OTP product unit is responsible for its support and maintenance.
It is a programming language for building Massively scalable soft real-time systems with high availability requirements. Telecoms, banking, E-commerce, Computer Telephone and instant messaging are few examples of the applications.
Here at LinuxAPT, we will look into how to install Erlang on Ubuntu 20.04 LTS.
Main features of Erlang includes:
- Clear declarative syntax and is largely free from side-effects.
- Built-in support for real-time, concurrent and distributed programming.
- Designed for development of robust and continuously operated programs.
- Dynamic code replacement at runtime.
Steps to Install Erlang on Ubuntu 20.04 LTS Focal Fossa
1. Perform System Update
To begin, ensure that all your system packages are up-to-date by running the following apt commands in the terminal:
$ sudo apt update
$ sudo apt upgrade
2. Install Erlang on the system
Now we add the repository to your Ubuntu system by running the following commands:
$ echo "deb https://packages.erlang-solutions.com/ubuntu focal contrib" | sudo tee /etc/apt/sources.list.d/rabbitmq.list
After that, update your system package list and install Erlang:
$ sudo apt update
$ sudo apt install erlang
Next, to verify the installation of erlang, we have to use the Shell Erlang command via the command line:
3. Test Erlang with Hello World Program
Now we will test by writing a simple Hello World Erlang code:
$ nano hellotest.erl
Add the following file:
% Test to display Hello World Erlang Code
fwrite("Coding Guys.. , Erlang World!\n").
Save and close, after that execute using the following command:
Erlang/OTP 23 [erts-11.1] [source] [64-bit] [smp:6:6] [ds:4:4:16] [async-threads:2]
Eshell V11.1 (abort with ^G)
** exception error: undefined shell command helloworld/0
Coding Guys.. , Erlang World!
How To Uninstall erlang from Ubuntu 20.04 ?
To uninstall only the erlang package we can use the following command:
$ sudo apt-get remove erlang
We can use the following command to remove erlang configurations, data and all of its dependencies, we can use the following command:
$ sudo apt-get -y autoremove --purge erlang
[Need help in fixing Ubuntu Linux system ? We can help you. ]
This article covers how to install the Erlang programming language on your Ubuntu 20.04 LTS Focal Fossa system. In fact, Erlang is a programming language used to build massively scalable soft real-time systems with requirements on high availability. Some of its uses are in telecoms, banking, e-commerce, computer telephony and instant messaging. Erlang's runtime system has built-in support for concurrency, distribution and fault tolerance.