The Elixir language website has instructions on how to install Elixir on Ubuntu, however following those steps may lead to future errors when trying to install some Erlang libraries.
Running the command sudo apt-get install elixir will install Erlang and then Elixir, but on a fresh copy of Ubuntu the version of Erlang it installs will not have SSL support so when you later try to install libraries like hackney and Hex it will throw errors:
Could not start Hex. Try fetching a new version with `mix local.hex` or uninstalling it with `mix archive.uninstall hex.ez`
** (UndefinedFunctionError) undefined function: :ssl.start/0 (module :ssl is not available)