The Ultimate Guide to Installing NVM (Node Version Manager) on Any OS

sreekutty

Devops

Last Updated: 7 October 2026
The Ultimate Guide to Installing NVM (Node Version Manager) on Any OS
🖥️12,400+PCs Fixed
⭐4.9★Google Rating
⚡<15 minAvg. Response
🛡️ISO 27001Certified

1. Why Use NVM Instead of a Standard Installer?

When you use the official Node.js installer, it performs a "global" installation that can lead to permission errors (requiring sudo) and limits you to just one version. NVM solves this by:

Managing Multiple Versions: Switch between "LTS" (Long Term Support) and the latest experimental versions easily.

Avoiding Permission Issues: NVM installs Node in your user directory, meaning you won’t need to use sudo for npm global installs.

Project Consistency: You can ensure every developer on your team is using the exact same Node version.

2. Installing NVM on macOS and Linux

For macOS and Linux users, NVM is a shell script that integrates into your terminal.

Step 1: Run the Install Script Open your terminal and run the following cURL command:

Bash Step 2: Update Your Profile

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

The script attempts to add the NVM configuration to your profile file (.bash_profile, .zshrc, or .bashrc). If the nvm command isn't recognized after restarting your terminal, you may need to manually add these lines to your ~/.zshrc or ~/.bashrc:

Bash

export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && echo "$HOME/.nvm" || echo "$XDG_CONFIG_HOME/nvm")" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm

Step 3: Verify Installation

Close and reopen your terminal, then type:

Bash

nvm --version

3. Installing NVM on Windows

Standard NVM does not support Windows natively. Instead, Windows users use a separate but similar tool called nvm-windows.

Step 1: Download the Installer Go to the nvm-windows releases page and download the nvm-setup.exe file.

Step 2: Run the Setup Follow the installation wizard. If you already have a version of Node.js installed, the installer will ask if you want NVM to manage it. Select Yes.

Step 3: Check in PowerShell Open PowerShell or Command Prompt (as Administrator) and run:

PowerShell

nvm version

4. How to Use NVM: Common Commands

Once installed, the commands are virtually identical across all operating systems.

Install a Specific Version:

Bash

nvm install 20.11.0 Install the Latest LTS (Recommended):

Bash

nvm install --lts Switch to a Version:

Bash

nvm use 18.19.0 List Installed Versions:

Bash

nvm ls

5. NVM vs. Other Version Managers

While NVM is the industry standard, there are other options available depending on your workflow.

NVM (Node Version Manager) The most popular choice for individual developers and teams. It is powerful and supports nearly every version of Node ever released.

Volta A newer, faster alternative written in Rust. It is "hassle-free" because it automatically switches versions based on the package.json file of the project you are currently in.

FNM (Fast Node Manager) Designed for speed, FNM is another Rust-based manager that is significantly faster than the original Bash-based NVM, making it a favorite for power users on macOS and Linux.

Troubleshooting Tip: The "Command Not Found" Error

If you have installed NVM but keep seeing "command not found," it is almost always because your terminal's configuration file (like .zshrc or .bashrc) hasn't been "sourced" or refreshed. Simply run source ~/.zshrc (on Mac/Linux) or restart your terminal entirely to fix the connection.

nvm

Get the Free Web Server Setup Checklist (PDF)

Nginx, SSL, security headers, and performance tips — the checklist every web project needs at launch.

Web performance or reliability issues costing customers?

Our Web Infrastructure service manages your web servers, SSL, CDN, and Cloudflare configuration — so your site is fast, secure, and always available.

  • Nginx/Apache server management and optimisation
  • SSL certificate installation and auto-renewal
  • Cloudflare WAF, CDN, and DNS management
  • Uptime monitoring with instant incident response
See Pricing Plans →

What our customers say

“Cloudflare kept blocking our customers. CloudHouse audited the rules and fixed it without compromising security. Fast work.”

Sarah K.

E-commerce Manager

“Our website was loading in 8 seconds. After CloudHouse tuned Nginx and Cloudflare, it's under 1.2 seconds.”

Amit V.

Product Manager

Frequently Asked Questions

Yes — 90% of fixes are done over a secure remote session in 15–30 minutes. Our technicians connect safely using industry-standard tools.

Need this done for you?

Explore all CloudHouse services

ERP, CRM, apps, servers, security and support from one team.

Learn more

Book your free 15-minute diagnosis

A certified technician will call you back within 15 minutes during business hours.

Share this article

Leave a Comment

Comments (0)

Loading comments...