How do I install NVM?
Short answer: On macOS and Linux, run the official script curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.41.0/install.sh | bash, open a new terminal and run nvm install --lts. On Windows, nvm does not work: install NVM for Windows with winget install nvm-windows and run nvm install lts. Both install Node.js 26, the current LTS version, and let you switch versions with nvm use.
NVM (Node Version Manager) installs several versions of Node.js on the same computer and switches between them with one command. That way each project can use the version it needs, and you never have to uninstall Node.js to try another one.
There are two tools with almost the same name:
- nvm (the nvm-sh project) for macOS, Linux and WSL. The latest version is 0.41.0, from November 4, 2026.
- NVM for Windows, a separate project with similar commands. The latest version is 2.0.1, from October 2, 2026.
The same three steps on every system: install NVM, install Node.js LTS and switch versions with nvm use.
NVM at a glance
| System | Tool | Install NVM | Install Node.js LTS | Step-by-step guide |
|---|---|---|---|---|
| Windows | NVM for Windows 2.0.1 | winget install nvm-windows | nvm install lts | Install NVM on Windows |
| macOS | nvm 0.41.0 | Official install script | nvm install --lts | Install NVM on Mac |
| Linux and WSL | nvm 0.41.0 | Official install script | nvm install --lts | Install NVM on Linux |
Install NVM on Windows
- If you already have Node.js installed, uninstall it from Settings > Apps first. The NVM for Windows team recommends it to avoid conflicts.
- Open PowerShell and install NVM for Windows:
winget install nvm-windowsYou can also download the installer, nvm-2.0.1-x64-setup.exe (or arm64 for ARM PCs), from the releases page and run it. Version 2 installs for your user, so you do not need an administrator terminal.
- Open a new terminal and install Node.js:
nvm install lts
nvm use lts
node -vThe full process, with upgrades from version 1 and the usual errors, is in how to install NVM on Windows.
Install NVM on macOS
- Open the Terminal and run the official script:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.41.0/install.sh | bash- Close the Terminal and open a new one, then check it:
command -v nvmIf it prints nvm, it worked. macOS uses zsh, and the script adds nvm to ~/.zshrc. If that file does not exist, the script cannot add it: create it with touch ~/.zshrc and run the script again.
The nvm team does not support installing nvm with Homebrew, so use the script. More details in how to install NVM on Mac.
Install NVM on Linux
- Make sure you have curl (on Ubuntu,
sudo apt install curl), then run the script:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.41.0/install.sh | bashIf you prefer wget: wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.41.0/install.sh | bash.
- Load nvm in the current terminal, or open a new one:
source ~/.bashrc
command -v nvmThe same steps work in WSL on Windows. The full guide, with Ubuntu, Debian, Fedora and the usual errors, is in how to install NVM on Linux.
Install Node.js and switch versions with NVM
The commands are almost the same on every system:
| What you want | macOS and Linux (nvm) | Windows (NVM for Windows) |
|---|---|---|
| Install the LTS version | nvm install --lts | nvm install lts |
| Install a specific version | nvm install 24 | nvm install 24 |
| Switch version | nvm use 24 | nvm use 24 |
| Set the default version | nvm alias default 26 | nvm use 26 (it becomes the default) |
| List installed versions | nvm ls | nvm list |
| Save the version in the project | node -v > .nvmrc | nvm pin |
| Uninstall a version | nvm uninstall 22 | nvm uninstall 22 |
Check the active version at any time with node -v and npm -v.
Which Node.js version should you install?
| Version | Status in November 2026 | Supported until |
|---|---|---|
| Node.js 26 | Active LTS, recommended for new projects | April 2029 |
| Node.js 24 | Maintenance LTS | April 2028 |
| Node.js 22 | Maintenance LTS | April 2027 |
| Node.js 20 | No longer supported | Ended April 2026 |
Node.js 27 is in testing and its stable release is planned for April 2027.
