---
name: "shell_default"
section: "3erl"
platform: "linux"
package: "erlang-manpages"
version: "1:25.2.3+dfsg-1+deb12u4"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/shell_default"
---

# shell\_default(3erl)

Customizing the Erlang environment.

## NAME

shell\_default - Customizing the Erlang environment.

## DESCRIPTION

The functions in this module are called when no module name is specified in a shell command.

Consider the following shell dialog:

```
1> lists:reverse("abc").
"cba"
2> c(foo).
{ok, foo}
```

In command one, module *lists* is called. In command two, no module name is specified. The shell searches module *user\_default* followed by module *shell\_default* for function *c/1*.

*shell\_default* is intended for "system wide" customizations to the shell. *user\_default* is intended for "local" or individual user customizations.

## HINT

To add your own commands to the shell, create a module called *user\_default* and add the commands you want. Then add the following line as the *first* line in your *.erlang* file in your home directory.

```
code:load_abs("$PATH/user_default").
```

*$PATH* is the directory where your *user\_default* module can be found.
