Install Elixir on macOS
| Homebrew note | |
| brew install elixir | |
| elixir --version | |
| PATH notes |
Homebrew note
macOS does not ship Elixir by default, so the community standard is Homebrew. If Homebrew is already on your machine, you are ready for the next step.
If not, set up Homebrew first with its normal install flow, then come back here. No manual Erlang download is needed.
brew install elixir
Install Elixir with one Homebrew command. Homebrew pulls in Erlang/OTP as a dependency, so you get both runtimes at once.
brew install elixir
elixir --version
Ask Elixir for its version. The answer lists both the Erlang/OTP runtime and the Elixir language version.
elixir --version
Erlang/OTP 27 [erts-15.2] [64-bit]
Elixir 1.18.2 (compiled with Erlang/OTP 27)
As a smoke test, evaluate one small expression. You can run the same line inside iex, which you start with the iex command.
elixir -e "IO.puts(2 + 3)"
5
PATH notes
Homebrew sets up PATH for you in new terminals. On Apple Silicon the tools live under /opt/homebrew/bin, while on Intel they live under /usr/local/bin.
If the shell does not see Elixir yet, close the terminal, open a new one, and check again. Advanced users can also try version managers such as asdf/vfox as plain local tools.
Next: Install Elixir on FreeBSD
Article author: Arthur Isaev