exenv (with examples)

exenv (with examples)

exenv versions

This command lists all the installed versions of Elixir.

Motivation: This command is useful to see which versions of Elixir are currently installed on your system.

Arguments: None

Example output:

  1.10.4
  1.11.3
* 1.12.1 (set by /home/user/.exenv/version)

The list above shows three installed versions of Elixir. The asterisk (*) represents the currently selected version.

exenv global version

This command sets a specific version of Elixir as the global default for the whole system.

Motivation: When working on a system, it can be beneficial to have a consistent Elixir version across all applications. Setting a global default version ensures that all applications will use the same Elixir version unless specifically overridden.

Arguments: version - the Elixir version you want to set as the global default.

Example: exenv global 1.12.1

exenv local version

This command sets a specific version of Elixir for the current application/project directory.

Motivation: Different projects may require different versions of Elixir. Using the exenv local command allows you to specify the Elixir version for a particular project without affecting other projects or the global default.

Arguments: version - the Elixir version you want to set for the current directory.

Example: exenv local 1.11.3

exenv version

This command displays the currently selected Elixir version.

Motivation: It is useful to know which version of Elixir is currently in use, especially when working on multiple projects or ensuring compatibility with specific libraries or dependencies.

Arguments: None

Example output: 1.12.1

exenv install version

This command installs a specific version of Elixir.

Motivation: Elixir is constantly evolving, and different projects may require different versions. The exenv install command allows you to easily install a specific version of Elixir, ensuring compatibility with your project’s requirements.

Arguments: version - the Elixir version you want to install.

Example: exenv install 1.11.3

Related Posts

How to use the command xo (with examples)

How to use the command xo (with examples)

The xo command is a pluggable, zero-configuration linting utility for JavaScript.

Read More
How to use the command `git lock` (with examples)

How to use the command `git lock` (with examples)

The git lock command is a part of the git-extras package and is used to lock a file in a Git repository, preventing it from being modified by a commit.

Read More
Splitting a File into Pieces (with examples)

Splitting a File into Pieces (with examples)

Introduction The split command is a powerful tool for splitting a file into smaller pieces.

Read More