Should IEx evaluate .erlang file?

OS: Ubuntu

I have .iex.exs and .erlang file in my home dir. Both of those file prints Hello to their shell.

But when I open iex, the .erlang file is evaluated and hence double “Hello” on my iex shell.

I know iex calls erl under the hood, so could this be a bug or a feature?

Update 1

Turns out the .erlang file is also evaluated when I run mix

.erlang file is loaded when you start Erlang VM. Both iex and mix need to run Erlang VM.


Oh so then I mistook .erlang as a erl shell customization script, just like .iex.exs for iex.