How to Get Started
-
2. Installing Erlang
How to Install Erlang on Linux Distros
-
3. Making Hello-World
Create an Erlang Hello World Example
Here for simplicity I’ll make use of the nano editor..mkdir ~/Documents/erlang
To put stuff into order an erlang directory is created with the above command
cd ~/Documents/erlang
We change to the target directory
nano helloworld.erl
And Append this Erlang content:
-module(helloworld). -export([start/0]). start() -> io:format("Hello world~n").
Ctrl+x to Save & Exit from nano editor
-
4. Running Hello World
Now to Executing the Erlang Hello World.
chmod +x ~/Documents/erlang/helloworld.erl
This to give Execution Permissions
erl
Then we start the Erlang Shell to Compile and Run the example
1> c(helloworld). {ok, helloworld}
To compile the Erlang helloworld Module
2> helloworld:start(). Hello world/nok
To Run
3> halt().
To Stop the program
In the end to Quit the Erlang shell hits Ctrl+c twice… -
5. Getting Started Docs
OnLine Erlang Tutorials and Documents
Contents