erl program starts the Erlang runtime system.
The exact details (e.g. whether
erl is a script or a program
and which other programs it calls) are system-dependent.
Windows 95/98/2000/NT users will probably want to use the
program instead, which run in its own window with scrollbars and
supports command-line editing.
erl program on Windows provides no line editing in its
shell, and on Windows 95 there is no way to scroll back to text which
has scrolled off the screen.
erl program must be used, however, in pipelines or if you want
to redirect standard input or output.
Starts the Erlang system.
Any argument starting with a plus sign (
+) is always interpreted
as a system flag (described below), regardless of where it occurs
on the command line.
Arguments starting with a hyphen (
-) are the start of
a flag. A flag includes all following arguments up to the next
argument starting with a hyphen.
erl -sname arne -myflag 1 -s mod func arg
-sname arne is a flag and so are
-s mod func arg. Note that these flags are treated
-sname arne is interpreted by the OTP system,
but it still included in the list of flags returned by
-s mod func arg is also
treated specially and it is not included in the return value
-myflag 1 is
not interpreted by the OTP system in any way, but it is
Plain arguments are not interpreted in any way. They
can be retrieved using
init:get_args/0. Plain arguments
can occur in two places: Before the first flag argument on the
command line, or after a
The following flags are supported:
--following will not be interpreted in any way. They can be retrieved by
init:get_args/0. The exception is arguments starting with a
+, which will be interpreted as system flags (see below).
Keyconfiguration parameter of the
AppNameapplication. See application(3). This type of flag can also be retrieved using the
File.boot, which is used to start the system. See init(3). Unless
Filecontains an absolute path, the system searches for
File.boot in the current and
<ERL_INSTALL_DIR>/bin/start.bootboot script is used.
$Varis expanded to
Directoryin the boot script.
mod1.erl mod2.erl ....and then terminate (with non-zero exit code if the compilation of some file didn't succeed). Implies
-noinput. Not recommended - use erlc(1) instead.
Config.config configuration file in order to configure the system. See application(3).
globalwill not maintain a fully connected network of distributed erlang nodes, and then global name registration cannot be used. See global(3).
-setcookie Cookieoption if want to override the default cookie.
Variableto the value
Valueof the Erlang system. For example:
% erl -env DISPLAY gin:0In this example, an Erlang system is started with the DISPLAY environment variable set to the value
-loader inetflag is present. On each host, there must be one Erlang node running, on which the
boot_servermust be started.
Idmust be identical to the name supplied together with the
instrument. Functionally, it behaves exactly like an ordinary Erlang system.
efile(use the local file system), or
inet(load using the
boot_serveron another Erlang node). If
Loaderis something else, the user supplied
Loaderport program is started.
-loaderflag is omitted
make:all()in the current work directory and then terminate. See make(3). Implies
Module. Only supported on Unix.
Modecan be either
interactiveto allow automatic code loading, or
embeddedto load all code during start-up. See code(3).
Hostis the fully qualified host name of the current host. This flag also ensures that
epmdruns on the current host before Erlang is started. See epmd(1).
code server. See code(3).
Directoriesto the head of the search path of the code server, as if
code:add_pathsa/1was called. See code(3).
Directoriesto the end of the search path of the code server, as if
code:add_pathsa/1was called. See code(3).
-sflag to the
init:boot()routine. See init(3).
erlang:set_cookie(node(),Cookie)is used, all other nodes will also be assumed to have their cookies set to
Cookie. In this way, several nodes can share one magic cookie. Erlang magic cookies are explained in auth(3).
-nameflag, with the exception that the host name portion of the node name will not be fully qualified. The following command is used do start Erlang at the host with the name
% erl -sname klacke Eshell V4.7 (abort with ^G) (klacke@gin)1>Only the host name portion of the node name will be relevant. This is sometimes the only way to run distributed Erlang if the DNS (Domain Name System) is not running. There can be no communication between systems running with the
-snameflag and those running with the
-nameflag, as node names must be unique in distributed Erlang systems.
All these flags are processed during the start-up of the Erlang
kernel servers and before any user processes are started.
All flags are passed to
init:boot(Args). See init(3).
All additional flags passed to the script will be passed to
init:boot/2 as well, and they can be accessed using
erl script invokes the code for the Erlang virtual
machine. This program supports the following flags:
Numbermust be in the range [15,32768].
% erl -name foo +B +l
In this example, a distributed node is started with the break handler turned off and a lot of info is displayed while the code is loading.
init(3), erl_prim_loader(3), erl_boot_server(3), code(3), application(3), heart(3), net_kernel(3), auth(3), make(3), epmd(1)