Installing Nim on Linux

Before we can begin programming in Nim we must first install the standard libraries and compiler.

This is available online from the Nim language site as a simple and free download.

https://nim-lang.org/install_unix.html

There are several installation methods using choosenim, scoop & manual installation. In these examples, we will use choosenim.

Choosenim installs Nim from the official repositories, its created by Dominik Picheta who is a core developer for the Nim language. It enables fast and easy switching between versions of Nim.

  1. As documented in the official GitHub repository execute the following command from the terminal.
curl https://nim-lang.org/choosenim/init.sh -sSf | sh

  1. Add the folder ~\.nimble\bin to your path as instructed at the end of the installation.
  2. Finally, confirm that Nim is detected correctly by opening a new terminal window and running
nim -v