<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged asdf</title>
<link>https://coderlegion.com/tag/asdf</link>
<description>Powered by Question2Answer</description>
<item>
<title>Elixir Setup Guide: Installing Erlang, Elixir, and Livebook with ASDF</title>
<link>https://coderlegion.com/9610/elixir-setup-guide-installing-erlang-elixir-and-livebook-with-asdf</link>
<description>&lt;h3 id=&quot;introduction&quot;&gt;Introduction&lt;/h3&gt;
&lt;p&gt;This article is part of a beginner series where I document my personal journey learning &lt;strong&gt;Elixir&lt;/strong&gt; and taking my first real steps in its ecosystem.&lt;/p&gt;
&lt;p&gt;I recently came from &lt;strong&gt;Node.js&lt;/strong&gt;, where setting up a development environment is usually very simple: install Node, get npm, add some VS Code extensions, and you're ready to go.&lt;/p&gt;
&lt;p&gt;With Elixir, the process is not hard, but I had a tough time finding a clear step-by-step guide. I ended up skipping important steps, which later caused a lot of unnecessary problems to fix.&lt;/p&gt;
&lt;p&gt;So in this guide, I’ll walk you through &lt;strong&gt;how to set up your Elixir environment from scratch&lt;/strong&gt; using ASDF.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; I’m using &lt;strong&gt;Linux Mint&lt;/strong&gt;, but the same process applies to most Linux distributions with small adjustments.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://i.giphy.com/media/4Zgy9QqzWU8C3ugvCa/giphy-downsized.gif&quot; alt=&quot;pinguim gif&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-is-asdf-and-why-use-it-&quot;&gt;What Is ASDF and Why Use It?&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://i.giphy.com/media/yoJC2qZ23Pb8HQI08g/giphy.gif&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;The first thing we’ll install is a small but very powerful tool called &lt;strong&gt;ASDF&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;[ASDF][1] is a &lt;strong&gt;version manager&lt;/strong&gt; that allows you to install and manage multiple versions of languages and runtimes — including &lt;strong&gt;Erlang&lt;/strong&gt; and &lt;strong&gt;Elixir&lt;/strong&gt; — on the same machine.&lt;/p&gt;
&lt;p&gt;That means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You can easily switch between versions&lt;/li&gt;
&lt;li&gt;Projects can define their own required versions&lt;/li&gt;
&lt;li&gt;Your global system stays clean&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Grab some coffee ☕ and let’s start.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-1-installing-asdf&quot;&gt;Step 1: Installing ASDF&lt;/h3&gt;
&lt;p&gt;First, go to the official website:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://asdf-vm.com/&quot;&gt;https://asdf-vm.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Click on &lt;strong&gt;Get Started&lt;/strong&gt; and check the installation method for your operating system.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=4969792934007661136&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;On Linux Mint (and Ubuntu-based distros), make sure you have &lt;code&gt;curl&lt;/code&gt; and &lt;code&gt;git&lt;/code&gt; installed:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo apt install curl git
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now clone the ASDF repository:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.9.0
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;shell-integration-very-important-&quot;&gt;Shell Integration (Very Important)&lt;/h4&gt;
&lt;p&gt;This step is critical so your terminal can recognize the &lt;code&gt;asdf&lt;/code&gt; command.&lt;/p&gt;
&lt;h5 id=&quot;if-you-use-oh-my-zsh&quot;&gt;If you use Oh My Zsh&lt;/h5&gt;
&lt;p&gt;Follow the plugin instructions from:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/asdf&quot;&gt;https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/asdf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Basically, add this line to your &lt;code&gt;~/.zshrc&lt;/code&gt; file:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;plugins=(git asdf)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then close and reopen your terminal.&lt;/p&gt;
&lt;h5 id=&quot;if-you-use-bash&quot;&gt;If you use Bash&lt;/h5&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=3452091372340258109&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Add these two lines to your &lt;code&gt;~/.bashrc&lt;/code&gt; file:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Restart the terminal.&lt;/p&gt;
&lt;h4 id=&quot;verify-installation&quot;&gt;Verify Installation&lt;/h4&gt;
&lt;p&gt;Run:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;asdf --version
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You should see something similar to:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;v0.9.0-9ee24a3
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-2-installing-the-erlang-plugin&quot;&gt;Step 2: Installing the Erlang Plugin&lt;/h3&gt;
&lt;p&gt;With ASDF installed, we can now install plugins. Let’s start with &lt;strong&gt;Erlang&lt;/strong&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;asdf plugin-add erlang
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;installing-system-dependencies&quot;&gt;Installing System Dependencies&lt;/h4&gt;
&lt;p&gt;Before compiling Erlang, we must install some required packages.&lt;/p&gt;
&lt;p&gt;For Linux Mint / Ubuntu 20-based systems:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=4250902851566363072&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;These dependencies are listed in the official ASDF Erlang plugin repository:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/asdf-vm/asdf-erlang&quot;&gt;https://github.com/asdf-vm/asdf-erlang&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-3-installing-erlang&quot;&gt;Step 3: Installing Erlang&lt;/h3&gt;
&lt;p&gt;List all available Erlang versions:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;asdf list-all erlang
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=2914432950873415211&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Install the latest stable version at the time of writing:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;asdf install erlang 24.2.1
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; This step takes time and may look frozen. That’s normal. Be patient.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=12081288385957681070&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;set-erlang-as-global-version&quot;&gt;Set Erlang as Global Version&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;asdf global erlang 24.2.1
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;test-erlang&quot;&gt;Test Erlang&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;erl
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you see the Erlang shell, everything is working.&lt;br&gt;
Exit with &lt;code&gt;Ctrl + C&lt;/code&gt; twice.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=3602725178836810932&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-4-installing-elixir-with-asdf&quot;&gt;Step 4: Installing Elixir with ASDF&lt;/h3&gt;
&lt;p&gt;Now let’s install the Elixir plugin:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;asdf plugin-add elixir
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;List available versions:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;asdf list-all elixir
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Since we installed Erlang OTP 24, we must install an Elixir version built for OTP 24.&lt;/p&gt;
&lt;p&gt;At the time of writing:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;asdf install elixir 1.13.3-otp-24
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Set it globally:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;asdf global elixir 1.13.3-otp-24
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;test-elixir&quot;&gt;Test Elixir&lt;/h4&gt;
&lt;p&gt;Start IEx:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;iex
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You should see the Elixir interactive shell.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=12211755436164361430&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;hello-world&quot;&gt;Hello World&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=16018175787732953936&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Inside IEx:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-elixir&quot;&gt;IO.puts(&quot;Hello World&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Welcome to Elixir &lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-5-using-livebook-for-experiments-and-notes&quot;&gt;Step 5: Using Livebook for Experiments and Notes&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=9478895543657364402&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Livebook&lt;/strong&gt; is similar to Jupyter Notebook for Python.&lt;/p&gt;
&lt;p&gt;It allows you to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Write executable Elixir code&lt;/li&gt;
&lt;li&gt;Document your learning&lt;/li&gt;
&lt;li&gt;Save notebooks as Markdown&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;installing-livebook&quot;&gt;Installing Livebook&lt;/h3&gt;
&lt;p&gt;Go to the official repository:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/livebook-dev/livebook&quot;&gt;https://github.com/livebook-dev/livebook&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Since Elixir is already installed globally, run:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mix escript.install hex livebook
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Confirm installation when prompted.&lt;/p&gt;
&lt;p&gt;Because we’re using ASDF, we must refresh shims:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;asdf reshim
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Start Livebook:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;livebook server
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now open your browser and go to:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;http://localhost:8080
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=14719100701539462777&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;In this article, we covered how to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install &lt;strong&gt;ASDF&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Install &lt;strong&gt;Erlang&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Install &lt;strong&gt;Elixir&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Set up &lt;strong&gt;Livebook&lt;/strong&gt; locally&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This setup gives you a solid and flexible environment to start learning and building with Elixir.&lt;/p&gt;
&lt;p&gt;In the next articles of this series, we’ll finally start writing real Elixir code.&lt;/p&gt;
&lt;p&gt;See you in the next post ⚡&lt;/p&gt;
</description>
<category>Tutorials</category>
<guid isPermaLink="true">https://coderlegion.com/9610/elixir-setup-guide-installing-erlang-elixir-and-livebook-with-asdf</guid>
<pubDate>Mon, 12 Jan 2026 20:42:17 +0000</pubDate>
</item>
</channel>
</rss>