Your init function returns immediately then you asked for init:stop() so Erlang quits as you ordered. What's wrong with a simple REPL cycle using your code like this: erl -noshell -s myshell loop -s init stop Take a look at LFE (git://github.com/rvirding/lfe.git), it works as expected: erl -noshell -s lfe_shell server -s init stop -pa ebin