### Compiling and Starting the Example Source: https://github.com/erlang/otp/blob/master/system/doc/getting_started/conc_prog.md Demonstrates how to compile the Erlang module and start the ping-pong process. The output shows the inter-process communication flow. ```erlang 2> c(tut16). {ok, tut16} 3> tut16:start(). <0.38.0> Pong received ping Ping received pong Pong received ping Ping received pong Pong received ping Ping received pong ping finished Pong finished ``` -------------------------------- ### Start Simple MG Example Source: https://github.com/erlang/otp/blob/master/lib/megaco/doc/guides/megaco_examples.md Starts a simple Media Gateway (MG) that connects to an MGC, sends a Service Change Request, and waits for a reply. Assumes the MG is in the 'megaco/examples/simple' directory. ```text cd megaco/examples/simple erl -pa ../../../megaco/ebin -s megaco_filter -s megaco megaco_simple_mg:start(). ``` -------------------------------- ### Starting a Target System for Illustration Source: https://github.com/erlang/otp/blob/master/system/doc/design_principles/release_handling.md This command illustrates how to start a target system using `erl` with a specific boot script and configuration file. `$ROOT` represents the installation directory of the target system. ```bash % cd $ROOT % bin/erl -boot $ROOT/releases/A/start -config $ROOT/releases/A/sys ... ``` -------------------------------- ### Pre-hook Example: `pre_init_per_suite` Source: https://github.com/erlang/otp/blob/master/lib/common_test/doc/guides/ct_hooks_chapter.md Demonstrates how to use a pre-hook to perform setup actions before a test suite is initialized. This example connects to a database and adds the connection handle to the configuration. If the connection fails, the test suite is marked as failed. ```erlang pre_init_per_suite(SuiteName, Config, CTHState) -> case db:connect() of {error,_Reason} -> {{fail, "Could not connect to DB"}, CTHState}; {ok, Handle} -> {[{db_handle, Handle} | Config], CTHState#state{ handle = Handle }} end. ``` -------------------------------- ### Start Simple MGC Example Source: https://github.com/erlang/otp/blob/master/lib/megaco/doc/guides/megaco_examples.md Starts a simple Media Gateway Controller (MGC) that listens on text and binary ports, handling Service Change Requests. Assumes the MGC is in the 'megaco/examples/simple' directory. ```text cd megaco/examples/simple erl -pa ../../../megaco/ebin -s megaco_filter -s megaco megaco_simple_mgc:start(). ``` -------------------------------- ### Start Application and Get Environment Variable Source: https://github.com/erlang/otp/blob/master/system/doc/design_principles/applications.md Demonstrates starting an application and retrieving an environment variable using application:start/1 and application:get_env/2 in the Erlang shell. ```erlang % erl Erlang (BEAM) emulator version 5.2.3.6 [hipe] [threads:0] Eshell V5.2.3.6 (abort with ^G) 1> application:start(ch_app). ok 2> application:get_env(ch_app, file). {ok,"/usr/local/log"} ``` -------------------------------- ### Application Starter Module Configuration Source: https://github.com/erlang/otp/blob/master/lib/kernel/doc/references/app.md Example of how to configure the 'mod' key for applications using start phases, specifically when employing the 'application_starter' module. ```erlang {mod, {application_starter,[Module,StartArgs]}} ``` -------------------------------- ### Run the Erlang C Port Example Source: https://github.com/erlang/otp/blob/master/system/doc/tutorial/c_port.md Demonstrates how to start the C program from Erlang and interact with it by calling 'foo' and 'bar' functions, then stopping the process. ```erlang 2> complex1:start("./extprg"). <0.34.0> 3> complex1:foo(3). 4 4> complex1:bar(5). 10 5> complex1:stop(). stop ``` -------------------------------- ### Erlang FTP Client Session Example Source: https://github.com/erlang/otp/blob/master/lib/ftp/doc/guides/ftp_client.md This example shows a complete FTP session, including starting the client, opening a connection, logging in, changing directories, and receiving a file. It illustrates the typical workflow for interacting with an FTP server using the Erlang FTP module. ```erlang 1> ftp:start(). ok 2> {ok, Pid} = ftp:open([{host, "erlang.org"}]). {ok,<0.22.0>} 3> ftp:user(Pid, "guest", "password"). ok 4> ftp:pwd(Pid). {ok, "/home/guest"} 5> ftp:cd(Pid, "appl/examples"). ok 6> ftp:lpwd(Pid). {ok, "/home/fred"}. 7> ftp:lcd(Pid, "/home/eproj/examples"). ok 8> ftp:recv(Pid, "appl.erl"). ok 9> ftp:close(Pid). ok 10> ftp:stop(). ok ``` -------------------------------- ### Map Update Optimization Example Source: https://github.com/erlang/otp/blob/master/erts/doc/notes.md Demonstrates optimization for map updates where keys and values are identical, reusing the original map. ```erlang 1> Map = #\{ a => b \}. #\{ a => b \} 2> Map#\{ a := b \}. ``` -------------------------------- ### Erlang Demonitor Example with Potential Race Condition Source: https://github.com/erlang/otp/blob/master/erts/doc/notes.md This example demonstrates a potential race condition when using erlang:demonitor/2. Previously, unlink/1 and erlang:demonitor/2 were asynchronous, leading to uncertainty about when a link or monitor was guaranteed to be inactive. The new behavior is atomic, but this code might fail or hang. ```erlang Mon = erlang:monitor(process, Pid), %% ... exit(Pid, bang), erlang:demonitor(Mon), receive {'DOWN', Mon , process, Pid, _} -> ok %% We were previously guaranteed to get a down message %% (since we exited the process ourself), so we could %% in this case leave out: %% after 0 -> ok end, ``` -------------------------------- ### Erlang Port Environment Variable Handling Source: https://github.com/erlang/otp/blob/master/erts/doc/notes.md Demonstrates setting environment variables for spawned processes using the `{env,Env}` directive in `erlang:open_port`. This example highlights a fix for values ending with '='. ```erlang {env,Env} ``` -------------------------------- ### Erlang Driver Thread API Example Source: https://github.com/erlang/otp/blob/master/erts/doc/notes.md Illustrates the usage of the new portable POSIX thread-like API for Erlang drivers, including threads, mutexes, condition variables, and read/write locks. ```c // Example usage of the new thread API (details not provided in source) // See erl_driver(3) for more information. ``` -------------------------------- ### Erlang gen_server:call Optimization Example Source: https://github.com/erlang/otp/blob/master/erts/doc/notes.md Illustrates a receive statement optimized for constant time execution, benefiting `gen_server:call/4`. The optimization applies to receive statements that only read a newly created reference. ```erlang gen:do_call/4 ``` -------------------------------- ### Force Built-in Zlib Source: https://github.com/erlang/otp/blob/master/erts/doc/notes.md Forces the use of the built-in zlib version during system configuration, overriding the system's installed version. ```Shell ./configure --enable-builtin-zlib ``` -------------------------------- ### Erlang Map Update Optimization Example Source: https://github.com/erlang/otp/blob/master/erts/doc/notes.md Illustrates an optimization for updating large maps with identical keys and values, where the original map is reused. This optimization was also applied to small maps in earlier versions. ```erlang 1> Map = LargeMap#{ 2> a => b 3> }. 4> Map#{ 5> a := 6> b 7> }. ``` -------------------------------- ### Configure Boot and Config for Static Emulator Clients Source: https://github.com/erlang/otp/blob/master/system/doc/embedded/embedded.md For diskless clients with static_emulator set to true, the boot and config files must be fetched from a fixed location. This example shows how to adjust the exec command to point to the client directory's bin. ```text exec $BINDIR/erlexec -boot $CLIENTDIR/bin/start \ -config $CLIENTDIR/bin/sys $* ``` -------------------------------- ### Example Erlang Node Path Source: https://github.com/erlang/otp/blob/master/system/doc/embedded/embedded.md This text indicates a typical path for an Erlang installation in an embedded system, used when modifying the start script. ```text /home/otpuser/otp ``` -------------------------------- ### Get Full Configure Help Source: https://github.com/erlang/otp/blob/master/HOWTO/DEVELOPMENT.md Obtain a comprehensive list of all configuration features and options by running configure with --help=r. ```bash ./configure --help=r ``` -------------------------------- ### Start Debug Emulator (Installed) Source: https://github.com/erlang/otp/blob/master/system/doc/tutorial/debugging.md Use the `-emu_type debug` option to start the debug emulator if it's part of your Erlang/OTP installation. ```text > erl -emu_type debug Erlang/OTP 25 [erts-13.0.2] ... [type-assertions] [debug-compiled] [lock-checking] Eshell V13.0.2 (abort with ^G) 1> ``` -------------------------------- ### Initial Erlang/OTP Setup and Build Source: https://github.com/erlang/otp/blob/master/HOWTO/DEVELOPMENT.md Clone the Erlang/OTP repository, set the environment variable, configure the build, and perform an initial compilation. This is the starting point for development. ```bash git clone -b maint git@github.com:erlang/otp cd otp && export ERL_TOP=`pwd` ./otp_build configure && make ``` -------------------------------- ### Example: Patch mnesia and ssl Source: https://github.com/erlang/otp/blob/master/HOWTO/OTP-PATCH-APPLY.md Example of patching 'mnesia' and 'ssl' applications from a specific source directory into an OTP installation. Ensure the source and installation directories are correctly specified. ```bash $ otp_patch_apply -s /home/me/git/otp -i /opt/erlang/my_otp \ mnesia ssl ``` -------------------------------- ### Erlang Monitor Node Exception Change Source: https://github.com/erlang/otp/blob/master/erts/doc/notes.md The erlang:monitor_node/2 BIF now fails with a 'notalive' exception if distribution has not been started, instead of the previous 'badarg' exception. ```erlang erlang:monitor_node/2 ``` -------------------------------- ### Install Erlang/OTP on Target Device Source: https://github.com/erlang/otp/blob/master/HOWTO/INSTALL-ANDROID.md Install the Erlang/OTP release on a target device by copying and extracting the tarball. This example shows installation on a Raspberry Pi. ```bash $ ./Install /usr/local/erlang ``` -------------------------------- ### Example Release Package Contents Source: https://github.com/erlang/otp/blob/master/system/doc/design_principles/release_structure.md A typical release package contains application `.app` and `.beam` files, the `.rel` file, and the boot script `start.boot`. ```text % tar tf ch_rel-1.tar lib/kernel-9.2.4/ebin/kernel.app lib/kernel-9.2.4/ebin/application.beam ... lib/stdlib-5.2.3/ebin/stdlib.app lib/stdlib-5.2.3/ebin/argparse.beam ... lib/sasl-4.2.1/ebin/sasl.app lib/sasl-4.2.1/ebin/sasl.beam ... lib/ch_app-1/ebin/ch_app.app lib/ch_app-1/ebin/ch_app.beam lib/ch_app-1/ebin/ch_sup.beam lib/ch_app-1/ebin/ch3.beam releases/ch_rel-1.rel releases/A/ch_rel-1.rel releases/A/start.boot ``` -------------------------------- ### Start as Hidden Node Source: https://github.com/erlang/otp/blob/master/erts/doc/references/erl_cmd.md Starts the Erlang runtime system as a hidden node in a distributed setup. Hidden nodes do not publish their connections. ```text erl -hidden ``` -------------------------------- ### Start Mnesia and Create a Table Source: https://github.com/erlang/otp/blob/master/lib/mnesia/doc/guides/mnesia_chap2.md Demonstrates the essential steps to initialize and start Mnesia, including creating a schema, starting the service, and creating a basic table. Use this for initial Mnesia setup. ```erlang % erl -mnesia dir '"/tmp/funky"' Erlang/OTP 27 [erts-15.1.2] Eshell V15.1.2 (press Ctrl+G to abort, type help(). for help) 1> mnesia:create_schema([node()]). ok 2> mnesia:start(). ok 3> mnesia:create_table(funky, []). {atomic,ok} 4> mnesia:info(). ``` ```erlang ---> Processes holding locks <--- ---> Processes waiting for locks <--- ---> Participant transactions <--- ---> Coordinator transactions <--- ---> Uncertain transactions <--- ---> Active tables <--- funky : with 0 records occupying 305 words of mem schema : with 2 records occupying 533 words of mem ===> System info in version "4.23.2", debug level = none <=== opt_disc. Directory "/tmp/funky" is used. use fallback at restart = false running db nodes = [nonode@nohost] stopped db nodes = [] master node tables = [] remote = [] ram_copies = [funky] disc_copies = [schema] disc_only_copies = [] [{nonode@nohost,disc_copies}] = [schema] [{nonode@nohost,ram_copies}] = [funky] 3 transactions committed, 0 aborted, 0 restarted, 2 logged to disc 0 held locks, 0 in queue; 0 local transactions, 0 remote 0 transactions waits for other nodes: [] ok ``` -------------------------------- ### Erlang/OTP Startup with Logger Level Info Source: https://github.com/erlang/otp/blob/master/system/doc/system_principles/error_logging.md This example shows the console output when Erlang/OTP starts with the logger level set to 'info', displaying progress reports for applications and supervisors. This configuration is useful for observing system startup events. ```text % erl -kernel logger_level info Erlang/OTP 21 [erts-10.0] [source-13c50db] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe] =PROGRESS REPORT==== 8-Jun-2018::16:54:19.916404 === application: kernel started_at: nonode@nohost =PROGRESS REPORT==== 8-Jun-2018::16:54:19.922908 === application: stdlib started_at: nonode@nohost =PROGRESS REPORT==== 8-Jun-2018::16:54:19.925755 === supervisor: {local,kernel_safe_sup} started: [{pid,<0.74.0>}, {id,disk_log_sup}, {mfargs,{disk_log_sup,start_link,[]}}, {restart_type,permanent}, {shutdown,1000}, {child_type,supervisor}] =PROGRESS REPORT==== 8-Jun-2018::16:54:19.926056 === supervisor: {local,kernel_safe_sup} started: [{pid,<0.75.0>}, {id,disk_log_server}, {mfargs,{disk_log_server,start_link,[]}}, {restart_type,permanent}, {shutdown,2000}, {child_type,worker}] Eshell V10.0 (abort with ^G) 1> ``` -------------------------------- ### Start Common Test Interactive Shell Manually Source: https://github.com/erlang/otp/blob/master/lib/common_test/doc/guides/run_test_chapter.md Start an Erlang shell manually, install configuration data using `ct:install/1`, and then start Common Test's interactive mode with `ct:start_interactive/0`. ```erlang %% Start Erlang shell manually %% erl %% Install configuration data (if any) 1> ct:install([]). ok %% Start Common Test interactive mode 2> ct:start_interactive(). ok ``` -------------------------------- ### Start Erlang/OTP with a Boot Script Source: https://github.com/erlang/otp/blob/master/system/doc/design_principles/release_structure.md Demonstrates how to start an Erlang/OTP system using a generated boot script, which automatically loads and starts all specified applications. ```text % erl -boot ch_rel-1 Erlang/OTP 26 [erts-14.2.5] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit] Eshell V14.2.5 (press Ctrl+G to abort, type help(). for help) 1> application:which_applications(). [{ch_app,"Channel allocator","1"}, {sasl,"SASL CXC 138 11","4.2.1"}, {stdlib,"ERTS CXC 138 10","5.2.3"}, {kernel,"ERTS CXC 138 10","9.2.4"}] ``` -------------------------------- ### Starting Gen_statem Process Source: https://github.com/erlang/otp/blob/master/system/doc/design_principles/statem.md Demonstrates how to start a gen_statem process using gen_statem:start_link/4, specifying name registration, callback module, and initial data. ```erlang start_link(Code) -> gen_statem:start_link({local,?NAME}, ?MODULE, Code, []). ``` -------------------------------- ### Start Megaco Controller Node Source: https://github.com/erlang/otp/blob/master/lib/et/doc/guides/et_examples.md This command starts a new Erlang node named 'mgc' and adds a path to the simple Megaco examples. It then connects to the 'observer' node and starts the Megaco application and the simple Media Gateway Controller. ```bash erl -sname mgc -pa ../../megaco/examples/simple ``` -------------------------------- ### PCRE2 (*SKIP) with Example Source: https://github.com/erlang/otp/blob/master/lib/stdlib/doc/src/re.md Demonstrates how (*SKIP) modifies the 'bumpalong' behavior for unanchored patterns. It skips ahead to a new starting position, preventing matches that would have started earlier. ```regex a+(*SKIP)b ``` -------------------------------- ### Example: Initializing with ei_connect_init Source: https://github.com/erlang/otp/blob/master/lib/erl_interface/doc/references/ei_connect.md Shows a basic initialization using ei_connect_init. This is suitable for simpler connection scenarios where extended parameters are not needed. ```c if (ei_connect_init(&ec, "madonna", "cookie...", n++) < 0) { fprintf(stderr,"ERROR when initializing: %d",erl_errno); exit(-1); } ``` -------------------------------- ### Start ET Viewer and Get Collector PID Source: https://github.com/erlang/otp/blob/master/lib/et/doc/guides/et_tutorial.md Starts an ET Viewer with a specified title and retrieves the associated Collector PID. This is the initial step to begin tracing events. ```erlang {ok, ViewerPid} = et_viewer:start([{title,"Coffee Order"}]), CollectorPid = et_viewer:get_collector_pid(ViewerPid). ``` -------------------------------- ### 32-bit Windows Environment Setup (Bash) Source: https://github.com/erlang/otp/blob/master/HOWTO/INSTALL-WIN32-OLD.md Configures environment variables for a 32-bit Windows installation, including PATH, COMSPEC, MSYSTEM, and drive mappings. This setup is for MSYS or Cygwin environments. ```bash # Some common paths if [ -x /usr/bin/msys-?.0.dll ]; then # Without this the path conversion won't work COMSPEC='C:\Windows\System32\cmd.exe' MSYSTEM=MINGW32 # Comment out this line if in MSYS2 export MSYSTEM COMSPEC # For MSYS2: Change /mingw/bin to the msys bin dir on the line below PATH=/usr/local/bin:/mingw/bin:/bin:/c/Windows/system32:\ /c/Windows:/c/Windows/System32/Wbem C_DRV=/c IN_CYGWIN=false else PATH=/ldisk/overrides:/usr/local/bin:/usr/bin:/bin:\ /usr/X11R6/bin:/cygdrive/c/windows/system32:\ /cygdrive/c/windows:/cygdrive/c/windows/system32/Wbem C_DRV=/cygdrive/c IN_CYGWIN=true fi obe_otp_gcc_vsn_map=" .*=>default " obe_otp_64_gcc_vsn_map=" .*=>default " # Program Files PRG_FLS=$C_DRV/Program\ Files # Visual Studio VISUAL_STUDIO_ROOT=$PRG_FLS/Microsoft\ Visual\ Studio\ 12.0 WIN_VISUAL_STUDIO_ROOT="C:\Program Files\Microsoft Visual Studio 12.0" # SDK SDK=$PRG_FLS/Windows\ Kits/8.1 WIN_SDK="C:\Program Files\Windows Kits\8.1" # NSIS NSIS_BIN=$PROGRAMFILES/NSIS # Java JAVA_BIN=$PROGRAMFILES/Java/jdk1.7.0_02/bin ## The PATH variable should be Cygwin'ish VCPATH= $VISUAL_STUDIO_ROOT/VC/bin:\ $VISUAL_STUDIO_ROOT/VC/vcpackages:\ $VISUAL_STUDIO_ROOT/Common7/IDE:\ $VISUAL_STUDIO_ROOT/Common7/Tools:\ $SDK/bin/x86 ## Microsoft SDK libs LIBPATH=$WIN_VISUAL_STUDIO_ROOT\\VC\\lib LIB=$WIN_VISUAL_STUDIO_ROOT\\VC\\lib\\;$WIN_KITS\\lib\\winv6.3\\um\\x86 INCLUDE=$WIN_VISUAL_STUDIO_ROOT\\VC\\include\\;\ $WIN_KITS\\include\\shared\\;$WIN_KITS\\include\\um;\ $WIN_KITS\\include\\winrt\\;$WIN_KITS\\include\\um\\gl # Put nsis, c compiler and java in path export PATH=$VCPATH:$PATH:$JAVA_BIN:$NSIS_BIN # Make sure LIB and INCLUDE is available for others export LIBPATH LIB INCLUDE ``` -------------------------------- ### Common Test FTP Multiple Connections Example Source: https://github.com/erlang/otp/blob/master/lib/common_test/doc/guides/config_file_chapter.md Example demonstrating how to manage multiple FTP connections within a Common Test test case, including setup and teardown. ```erlang init_per_testcase(ftptest, Config) -> {ok,Handle1} = ct_ftp:open(ftp_host), {ok,Handle2} = ct_ftp:open(ftp_host), [{ftp_handles,[Handle1,Handle2]} | Config]. end_per_testcase(ftptest, Config) -> lists:foreach(fun(Handle) -> ct_ftp:close(Handle) end, proplists:get_value(ftp_handles,Config)). ftptest() -> [{require,ftp_host}, {require,lm_directory}]. ftptest(Config) -> Remote = filename:join(ct:get_config(lm_directory), "loadmodX"), Local = filename:join(proplists:get_value(priv_dir,Config), "loadmodule"), [Handle | MoreHandles] = proplists:get_value(ftp_handles,Config), ok = ct_ftp:recv(Handle, Remote, Local), ... ``` -------------------------------- ### Example of ct_run with no_nl log option Source: https://github.com/erlang/otp/blob/master/lib/common_test/doc/guides/run_test_chapter.md This example shows how to start a test suite with the `no_nl` log option, which prevents Common Test from adding newline characters to output strings. ```bash $ ct_run -suite my_SUITE -logopts no_nl ``` -------------------------------- ### Erlang Startup with Distribution Flags Source: https://github.com/erlang/otp/blob/master/erts/doc/guides/alt_dist.md This example shows the command-line arguments required to start an Erlang node with distribution enabled using the `uds_dist` protocol. It includes path, protocol, disabling epmd, and setting a node name. ```bash $ erl -pa $ERL_TOP/lib/kernel/examples/uds_dist/ebin -proto_dist uds -no_epmd Erlang (BEAM) emulator version 5.0 Eshell V5.0 (abort with ^G) 1> net_kernel:start([bing,shortnames]). {ok,<0.30.0>} (bing@hador)2> ``` ```bash $ erl -pa $ERL_TOP/lib/kernel/examples/uds_dist/ebin -proto_dist uds \ -no_epmd -sname bong Erlang (BEAM) emulator version 5.0 Eshell V5.0 (abort with ^G) (bong@hador)1> ``` -------------------------------- ### Start Erlang Top with Configuration Source: https://github.com/erlang/otp/blob/master/lib/observer/doc/guides/etop_ug.md Set configuration parameters like node, cookie, and lines when starting Erlang Top from the command line. ```text % etop -node tiger@durin -setcookie mycookie -lines 15 ``` -------------------------------- ### Example: Get Person Name from Record Source: https://github.com/erlang/otp/blob/master/system/doc/reference_manual/ref_man_records.md Demonstrates accessing the 'name' field of a 'person' record. ```erlang -record(person, {name, phone, address}). get_person_name(Person) -> Person#person.name. ``` -------------------------------- ### Create a simple C test program Source: https://github.com/erlang/otp/blob/master/HOWTO/INSTALL-RASPBERRYPI3.md Creates a 'test.c' file with a basic 'Hello, world!' program and compiles it using the cross-compiler. ```bash $ cat > test.c $ int main() { printf("Hello, world!\n"); return 0; } $ armv8-rpi3-linux-gnueabihf-gcc -o test test.c ``` -------------------------------- ### Getting All Logger Configuration Source: https://github.com/erlang/otp/blob/master/lib/kernel/doc/guides/logger_chapter.md Use logger:get_config/0 to view all currently installed filters and their configurations. ```erlang logger:get_config() ``` -------------------------------- ### Install Erlang/OTP Documentation (install target) Source: https://github.com/erlang/otp/blob/master/HOWTO/INSTALL.md Use this command after installing Erlang/OTP with the 'install' target. It respects configure locations and supports DESTDIR. ```bash $ make install-docs ``` -------------------------------- ### Configure and Build Erlang/OTP with WxWidgets (Shared Library) Source: https://github.com/erlang/otp/blob/master/HOWTO/INSTALL.md Configure the build with a specified installation prefix, then compile and install. Finally, update the PATH to include the new binary directory. This is for non-Linux platforms. ```shell $ ./configure --prefix=/usr/local $ make && sudo make install $ export PATH=/usr/local/bin:$PATH ``` -------------------------------- ### Start Erlang Node with Observer and ET Source: https://github.com/erlang/otp/blob/master/lib/et/doc/guides/et_examples.md This command starts an Erlang node with the 'observer' application, which is typically used to run the ET viewer. It assumes the observer application is available in the Erlang/OTP installation. ```bash erl -sname observer ``` -------------------------------- ### Install Release Source: https://github.com/erlang/otp/blob/master/system/doc/design_principles/release_handling.md Installs an unpacked release by evaluating the instructions in its .relup file. If successful, the system starts using the new release version. On error, it reverts to the old version upon reboot. ```erlang release_handler:install_release(Vsn) => {ok, FromVsn, []} ``` -------------------------------- ### Install using the 'release' Target Source: https://github.com/erlang/otp/blob/master/HOWTO/INSTALL.md Create an Erlang/OTP installation in a specified directory using the 'release' target and then run the 'Install' script manually. This method ignores configure-time paths and DESTDIR. ```bash $ ./configure $ make $ make RELEASE_ROOT=/home/me/OTP release $ cd /home/me/OTP $ ./Install -minimal /home/me/OTP $ mkdir -p /home/me/bin $ cd /home/me/bin $ ln -s /home/me/OTP/bin/erl erl $ ln -s /home/me/OTP/bin/erlc erlc $ ln -s /home/me/OTP/bin/escript escript ```