Node Version Manager (NVM): Installation Guide

Estimated read time 3 min read

Introduction to Node Version Manager (NVM)

Node.js, a powerful runtime environment for JavaScript, offers a multitude of features and capabilities for building server-side applications. As Node.js evolves, different projects may require specific versions of Node.js to function correctly. Managing these versions can be challenging without the right tools. This is where Node Version Manager (NVM) comes in. In this article, we will explore how to install and use NVM to manage multiple Node.js versions effortlessly.

Understanding NVM

Node Version Manager (NVM) is a command-line tool that allows you to install and switch between multiple versions of Node.js on your machine. With NVM, you can easily install specific Node.js versions, switch between them for different projects, and seamlessly manage dependencies associated with each version.

Installing NVM on Unix-Based Systems (Mac and Linux)

To install NVM on Unix-based systems such as macOS and Linux, follow these steps:

  1. Open your terminal.
  2. Download the NVM installation script using cURL by running the command: curl -o- | bash.
  3. Follow the prompts in the terminal to complete the installation. This will add the necessary NVM environment variables to your shell configuration file (e.g., .bashrc, .zshrc).
  4. Close and reopen your terminal to ensure the NVM changes take effect.
  5. Verify the installation by running the command: nvm --version. It should display the installed version of NVM.

Installing NVM on Windows

Installing NVM on Windows requires a slightly different approach. Follow these steps:

  1. Visit the official NVM for Windows repository on GitHub (
  2. Download the latest stable release of NVM for Windows.
  3. Run the installer and follow the on-screen instructions. By default, NVM will be installed in the %ProgramFiles%\nvm directory.
  4. After the installation is complete, open a new command prompt or PowerShell window.
  5. Verify the installation by running the command: nvm version. It should display the installed version of NVM.

Using NVM to Manage Node.js Versions

Now that NVM is installed, you can start managing your Node.js versions effortlessly. Here are a few common NVM commands:

  • nvm install version: Installs the specified version of Node.js. For example, nvm install 14.17.3 installs Node.js version 14.17.3.
  • nvm use version: Switches the current shell session to use the specified version of Node.js. For example, nvm use 14.17.3 sets the Node.js version to 14.17.3 for the current session.
  • nvm alias default version: Sets the default Node.js version to use in new shell sessions. For example, nvm alias default 14.17.3 sets the default version to 14.17.3.
  • nvm list: Lists all installed Node.js versions and indicates the currently active version.

Installing Node.js with NVM

With NVM, installing Node.js versions is a breeze. Here’s how to install a specific Node.js version using NVM:

  1. Open your terminal or command prompt.
  2. Check the available Node.js versions by running the command: nvm ls-remote.
  3. Choose the desired version and install it using the command: nvm install version.
Mark Stain

My name is Mark Stein and I am an author of technical articles at EasyTechh. I do the parsing, writing and publishing of articles on various IT topics.

You May Also Like

More From Author

+ There are no comments

Add yours