[erlang-questions] Detailed usage about the erl -detached, -remsh, run_erl, to_erl

Erik Søe Sørensen <>
Thu Apr 12 12:39:37 CEST 2012

Den 12. apr. 2012 12.26 skrev Barco You <>:

> Dear Erlangers,
> Although erlang doc has descriptions regarding these commands, but it's
> difficult to know how to use them in practice.
> I googled but cannot find details of their usage.
> Hope I can find answers at least for the following issues:
> 1. by using "erl -detached", if not indicating "-setcookie", how can I
> connect to this node console by using "-remsh"?
The default cookie has the value in the file ~/.erlang.cookie. (This file
is generated automatically with a random value, in case it doesn't exists.)

> 2. After successfully connect to the console of "erl -detached" through
> "-remsh" how can I quit from the console but keep the node still running
> which started by "erl -detached"?
Ctrl-g, then 'q'.
(Or '?' to get a list of options.)

3. If use run_erl to start a node, how can I connect to its console through
> "to_erl"? needing to indicate "-setcookie"?
run_erl uses a pipe file for communication. You specify the filename of
that pipe when you start to_erl.
  $ to_erl -help
  Usage: to_erl [-h|-F] [pipe_name|pipe_dir/]
It appears that '/tmp/erlang.pipe' is the default.

> 4. Same as question 2, how to quit the to_erl without interrupting the
> node started by "run_erl"?
Ctrl-D - which means "end-of-file" on Unix. I don't know if it's different
on Windows.

5. What's the difference between these to way to start erl program at
> backgroud?
How to attach to them, certainly. And possibly also something about
logging. I don't know the complete answer.

Appreciate all kinds of answers!

The above is mostly of the "off-the-top-of-my-head" kinds :-)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120412/5c696762/attachment.html>

More information about the erlang-questions mailing list