[erlang-questions] How to start an erlang applications from the command line non-interactively?

Gleb Peregud <>
Mon May 5 20:44:24 CEST 2008

On 5/5/08, Jarrod Roberson <> wrote:
> I have the Pragmatic Programmers book, and have searched Google and can't
> figure out how to start my program from the command line in _non_
> interactive mode.
> I am using windows at the moment as well, but I can translate from *nix
> instructions.
> I have tried the -s and -run options to erl but they both leave me in an
> interactive erlang shell.
> I want the interpreter to start up and run my app and detach from the shell
> "stand alone".

Let's say that your beam files are in ./ebin/ and there is module
"gui" with function "run". To run it in non-iteractive mode use this:

erl -noshell -pa ebin/ -s gui run -s erlang halt

Additionally take a look at "man run_erl", which handles detaching of
erlang app (and other daemon-related stuff)

Gleb Peregud

Every minute is to be grasped.
Time waits for nobody.
-- Inscription on a Zen Gong

More information about the erlang-questions mailing list