[erlang-questions] Setting node name from the shell started withou -name or -sname

Andrew Stone <>
Wed Apr 23 19:46:00 CEST 2008

Hi Zvi,

You can set the node name with net_kernel:start(atom()).

You must however make sure that epmd is running on your system. You can do this with os:cmd("epmd -daemon"). You may want to put a timer:sleep() after this though, as I'm not sure it is ready immediately after return. 

You are correct that you can set the cookie with erlang:set_cookie/2.


----- Original Message ----
From: Zvi <>
Sent: Wednesday, April 23, 2008 1:14:25 PM
Subject: [erlang-questions] Setting node name from the shell started withou -name or -sname

It's possible to set cookie name programmatically, using erlang:set_cookie/2,
even if BEAM started without -setcookie flag or .erlang.cookie file.
How to set a node name for BEAM started without -name or -sname flags?
There is undocumented erlang:setnode/2 BIF, I guess that it's:
but still have no idea how to use it.


View this message in context: http://www.nabble.com/Setting-node-name-from-the-shell-started-withou--name-or--sname-tp16834718p16834718.html
Sent from the Erlang Questions mailing list archive at Nabble.com.

erlang-questions mailing list


More information about the erlang-questions mailing list