Learn Elixir
Build fault-tolerant, concurrent systems on the Erlang VM.
Free to start. Built from a single prompt. No credit card.
Elixir is a dynamic, functional language created by José Valim that runs on the BEAM, the virtual machine built for Erlang telecom systems. It inherits lightweight processes that share no memory, message passing, and the OTP toolkit of supervisors that restart crashed parts automatically. That makes it a strong fit for chat, real-time dashboards and other services handling many connections. The syntax is friendly, with pattern matching and a pipe operator for chaining transformations. Phoenix is its main web framework. Learnr builds a personalized Elixir course from one prompt and teaches it through short interactive lessons.
How to learn Elixir, step by step
- Install Elixir and explore IEx. Install Elixir, which brings Erlang/OTP with it, and open the interactive shell with iex. Try atoms, tuples, maps and the h helper, which prints documentation for any function right in the shell.
- Learn that = is a match, not assignment. Practice destructuring with {:ok, value} = result and see a MatchError when shapes differ. Then write functions with several clauses that match different inputs, which replaces many if and else chains.
- Chain transformations with Enum and |>. Rewrite nested calls as pipelines that pass each result into the next function's first argument. Solve small exercises like counting words in a file using File.read, String.split and Enum.frequencies.
- Spawn processes and send messages. Use spawn, send and receive to build a tiny counter process. Watch how a crash in one process leaves others running, which is the foundation of the let it crash philosophy.
- Wrap state in a GenServer with a supervisor. Rebuild the counter as a GenServer using handle_call and handle_cast, then start it under a Supervisor in a Mix project. Kill it from IEx and watch it restart.
- Ship a small Phoenix app. Generate a project with mix phx.new, add an Ecto schema and a LiveView page that updates in real time. A Learnr lesson a day keeps OTP vocabulary fresh while the app grows.
What you'll learn
- Use pattern matching in assignments, function heads and case
- Transform data with the Enum module and the pipe operator
- Spawn processes and pass messages between them
- Build a stateful GenServer under a supervisor
- Start a Phoenix app with Mix and Ecto
What's inside your Elixir course
A sample path Learnr builds for Elixir. Your real course adapts to your goal and level.
- 1. IEx, basic types, atoms and tuples
- 2. Pattern matching and multi-clause functions
- 3. Lists, maps, Enum and the pipe operator
- 4. Processes, messages and the actor model
- 5. OTP: GenServer, supervisors and applications
- 6. Phoenix, Ecto and LiveView basics
How long does it take to learn Elixir?
Developers with another language can write basic Elixir in 2 to 4 weeks. Getting comfortable with OTP and Phoenix usually takes 2 to 4 months at 5 to 8 hours a week, longer if functional programming is new to you.
What you need before you start
Experience in another programming language and basic command-line use. Knowing how web requests work helps once you reach Phoenix.
Common mistakes to avoid
- Writing Elixir like Ruby because the syntax looks similar. Data is immutable, so return new values instead of trying to change existing ones.
- Using a GenServer for everything, which creates a bottleneck. Plain functions and modules are enough unless you truly need state or concurrency.
- Jumping to Phoenix before understanding processes and OTP, then being lost when something crashes. Learn the BEAM basics first.
How Learnr builds your course
Type your topic
Tell Learnr you want to learn Elixir, or get as specific as you like.
Get a personalized course
Learnr instantly builds a full Elixir course tailored to your goal and skill level.
Learn and level up
Move through bite-sized lessons and interactive practice, earning XP and keeping your streak.
Elixir questions, answered
Do I need to learn Erlang first?
No. Elixir gives you full access to Erlang libraries and the BEAM without writing Erlang. Reading a little Erlang becomes useful later for library docs and error messages.
What is Phoenix LiveView?
LiveView lets you build interactive, real-time pages with server-rendered Elixir code over a WebSocket, so you can write many dynamic features without a separate JavaScript framework.
Explore more courses
More programming and tech courses
- Learn Lua
- Learn Dart
- Learn Flutter
- Learn React Native
- Learn Svelte
- Learn Angular
- Learn Tailwind CSS
- Learn GraphQL
See all programming and tech courses
Ready to learn Elixir?
Start your free, personalized Elixir course in seconds. .