September 30, 2017 in Tutorial2 minutes

In this tutorial we’ll learn how to install Julia on Ubuntu 16.04 (Xenial Xerus).
Julia is a high-level, high-performance dynamic programming language for numerical computing. It provides a sophisticated compiler, distributed parallel execution, numerical accuracy and an extensive mathematical function library.
Several features of Julia
Julia is available from Ubuntu 16.04 repository. To install Julia we can run commands below
Update apt database using the command below
sudo apt-get updateInstall Julia using the command below
sudo apt-get install juliaJulia and its dependencies will be installed. Press Y to continue.
Now we can run Julia interactive by running julia.
To print simple Hello world on Julia we can use println function from Julia interactive.
julia> println("Hello Julia! - howtodojo.com")
Hello Julia! - howtodojo.comNow Julia is ready to be used but the current installed version is not the latest stable version of Julia. As you can see above Julia version shipped in Ubuntu repository is version 0.4.5 while at the time of this writing, the latest stable version of Julia is version 0.6.1. If you want or need to use latest version of Julia you can continue reading the next section.
In this section we’ll learn how to install latest version of Julia on Ubuntu 16.04.
To get latest version of Julia we can go to Julia download page.
Let’s download Julia binary for Linux 64 bit
wget -c https://julialang-s3.julialang.org/bin/linux/x64/0.6/julia-0.6.1-linux-x86_64.tar.gzExtract the downloaded package.
tar xzf julia-0.6.1-linux-x86_64.tar.gzRename extracted folder as julia
mv julia-0d7248e2ff juliaMove julia directory to /opt
sudo mv julia /optopen .profile on home directory.
find line
PATH="$HOME/bin:$HOME/.local/bin:$PATH"replace with
PATH="$HOME/bin:$HOME/.local/bin:/opt/julia/bin:$PATH"You can relogin so that .profile will be re-read by shell or you can run command below
source ~/.profileIn this tutorial we learned how to install Julia programming language Ubuntu 16.04 from Ubuntu repository and also how to install the latest stable version of Julia by downloading binary from Julia website.