Appendix A: Setup and Install
The way you install Elixir is different on each operating system. It would be very nice if we could all agree on the One True Way™ to install software, but alas, we do not. So below are the three major operating systems and their installation instructions, for your convienience.
In this book you're going to need to have something to edit code with. I recommend Sublime Text 3 because it is easy-to-use and works across all the major operating systems. You should install it now.
There's some official instructions on how to install Elixir but they're missing one key step: installing either Homebrew or Macports first.
Homebrew and Macports are tools that help installing software packages on macOS. Homebrew is the more modern option, and so that's the one I would really recommend using here.
To install Homebrew, copy the line from Homebrew's homepage into your Terminal and run it. If you don't know where to find your Terminal, it's located in the Applications directory → Utilties → Terminal.
Once you've run that command to install Homebrew and it has finished, then run this one to install Elixir:
brew install elixir
Windows is by far the easiest to install Elixir on. The offical Elixir install guide recommends using the Elixir installer. All you have to do is to download it, click next a couple of times and then finish once and Elixir should be installed.
There are too many varieties of Linux to list here, so instead I will link to the official Elixir installation instructions for Linux. Follow those to get Elixir installed on your Linux operating system.
Verifying Elixir is installed
No matter how you installed Elixir, verifying it is installed is done the same way across all operating systems. To verify that Elixir was installed correctly, run this command:
If this command says something like this:
Erlang/OTP 19 [erts-8.1] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace] Elixir 1.5.0
Then that means Elixir has been successfully installed.