Elixir (programming language)/Installation Guide
Jump to navigation
Jump to search
Installation Guide[edit]
Option 1: Installing Elixir on macOS[edit]
- Download the Homebrew package manager by executing the command:
<code>brew install</code>
- Install Elixir by executing the following command:
<code>brew install elixir</code>
Option 2: Installing Elixir on Ubuntu[edit]
- Update the package list by running this command:
<code>sudo apt-get update</code>
- Install the Elixir package by executing the following command:
<code>sudo apt-get install elixir</code>
Option 3: Installing Elixir on Windows[edit]
- Download the latest Windows installer for Elixir from the official website.
- Run the installer and follow the on-screen instructions to complete the installation.
Option 4: Installing Elixir using asdf[edit]
- Install asdf version manager by executing the following command:
<code>git clone https://github.com/asdf-vm/asdf.git ~/.asdf</code>
- Add asdf to your shell initialization file (e.g., ~/.bashrc) by executing the following command:
<code>echo '. $HOME/.asdf/asdf.sh' >> ~/.bashrc</code>
- Install the Erlang plugin by executing the following command:
<code>asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git</code>
- Install the Elixir plugin by executing the following command:
<code>asdf plugin add elixir https://github.com/asdf-vm/asdf-elixir.git</code>
- Install the required versions of Erlang and Elixir:
<code>asdf install erlang <version></code>
<code>asdf install elixir <version></code>
Verifying the Installation[edit]
- Open a new terminal window and run the following command to check the installed Elixir version:
<code>elixir --version</code>
- To verify the Erlang installation, run the following command:
<code>erl</code>
- Press `Ctrl + G` to enter the Erlang shell, then type `q().` and press Enter to exit.