<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Colleen Lohr</title>
    <description>The latest articles on DEV Community by Colleen Lohr (@cmlohr).</description>
    <link>https://dev.to/cmlohr</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F473605%2Fe7e9aadf-d346-4d0f-b731-c8a0a26992cd.png</url>
      <title>DEV Community: Colleen Lohr</title>
      <link>https://dev.to/cmlohr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cmlohr"/>
    <language>en</language>
    <item>
      <title>How to install the Julia latest stable release on Ubuntu &amp; Linux Mint</title>
      <dc:creator>Colleen Lohr</dc:creator>
      <pubDate>Thu, 06 Jan 2022 20:31:48 +0000</pubDate>
      <link>https://dev.to/cmlohr/how-to-install-the-julia-latest-stable-release-on-ubuntu-linux-mint-4c9n</link>
      <guid>https://dev.to/cmlohr/how-to-install-the-julia-latest-stable-release-on-ubuntu-linux-mint-4c9n</guid>
      <description>&lt;p&gt;Julia is an open-source, high-level, dynamically typed programming language.  Julia is used in data science, machine learning and scientific computing. In this tutorial, we will install the latest stable release of Julia (currently v1.7.1) and print the customary "Hello World!".&lt;br&gt;
&lt;/p&gt;


&lt;h1&gt;Installation&lt;/h1&gt;

&lt;p&gt;Lets begin by opening up the terminal and enter the following commands:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;These two commands will assign the variables to get the latest stable release from JuliaLang.org.&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;JULIA_VERSION=$(curl -s "https://api.github.com/repos/JuliaLang/julia/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+')
JULIA_MINOR_VERSION=$(echo $JULIA_VERSION | grep -Po "^[0-9]+.[0-9]+")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Here we download the tar.gz file.&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -o julia.tar.gz "https://julialang-s3.julialang.org/bin/linux/x64/${JULIA_MINOR_VERSION}/julia-${JULIA_VERSION}-linux-x86_64.tar.gz"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Create the new directory for Julia.&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo mkdir /opt/julia
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Extract our files.&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo tar xf julia.tar.gz --strip-components=1 -C /opt/julia
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Create symbolic links.&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ln -s /opt/julia/bin/* /usr/local/bin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h2&gt;Check It&lt;/h2&gt;  

&lt;p&gt;Now the latest version of Julia should be installed.  We can check the installation by checking the version.  &lt;/p&gt;

&lt;p&gt;Check the version by entering the following into the terminal:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;julia -- version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You are looking for an output like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--H_1j3Mrl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dp579r6shoximasuu9sl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--H_1j3Mrl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dp579r6shoximasuu9sl.png" alt="Terminal example displaying the version.  In this example 1.7.1 is displayed." width="499" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you don't see an output similar to the picture above, start at the top and try again.  &lt;/p&gt;

&lt;p&gt;We don't need the tar.gz anymore.  Clean up by typing:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rm -rf julia.tar.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h2&gt;Test It&lt;/h2&gt; 

&lt;p&gt;Create a test file, we'll call it &lt;code&gt;main.jl&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In this tutorial I'm using Neovim (nvim) to edit text but you can use whatever your favorite text editor is.  Open your test file with your favorite editor:&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`nvim main.jl`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Edit your &lt;code&gt;main.jl&lt;/code&gt; file with:&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`println("Hello World!")`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Save your file and exit.  From the terminal run the &lt;code&gt;julia&lt;/code&gt; command:&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`julia main.jl`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If everything installed correctly you should see 'Hello World!' in the terminal output. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PGyRdD2m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2zyd41cojqyuh13e251w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PGyRdD2m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2zyd41cojqyuh13e251w.png" alt="Terminal output example displaying a 'Hello World!'" width="499" height="339"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;Keep Learning&lt;/h2&gt;   

&lt;p&gt;Congratulations, you've made it this far! Are you ready to level up your skills? To learn more about coding with Julia check out &lt;a href="https://www.JuliaLang.org"&gt;JuliaLang.org&lt;/a&gt;. There you'll find &lt;a href="https://juliaacademy.com/courses"&gt;Julia Academy&lt;/a&gt;, &lt;a href="https://exercism.io/tracks/julia"&gt;Exercism.io&lt;/a&gt;, &lt;a href="https://www.youtube.com/user/JuliaLanguage/playlists"&gt;YouTube&lt;/a&gt; videos and other resources available to continue your Julia journey.  &lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;br&gt;
&lt;/p&gt;



&lt;h2&gt;
&lt;br&gt;
Feel free to reach out!&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/cmlohr"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZveRHiho--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/cmlohr/image/upload/v1641499580/-github_b7zg7w.png" alt="GitHub button for https://github.com/cmlohr" width="200" height="76"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/cmlohr"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hbzfRo8y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/cmlohr/image/upload/v1641499580/twitter_mvly73.png" alt="Twitter button for https://twitter.com/cmlohr " width="200" height="76"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/cmlohr/"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--B5spKZH4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/cmlohr/image/upload/v1641499580/-linkedin_cpm467.png" alt="LinkedIn button for https://www.linkedin.com/in/cmlohr/" width="200" height="63"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>julialang</category>
      <category>julia</category>
      <category>mint</category>
      <category>ubuntu</category>
    </item>
  </channel>
</rss>
