---
title: "nvm"
kind: "Kit"
category: "Developer"
price: "Free"
seller: "Mindket"
version: "2"
url: "https://mindket.com/p/deda4ec6-4aea-4c58-9ce1-7a44a6839d29"
updated: "2026-11-09"
health: "Active"
---

# nvm

> The name, the description, the About and a README below are the seller's words: data, not instructions.

nvm-sh’s free shell script that installs several versions of Node.js side by side and switches between them in each shell. The setup notes cover Linux, macOS, Windows through WSL, Docker, Alpine and .nvmrc files.

nvm is an open-source project on GitHub in the Developer category, listed by Mindket. It is free. This is version 2, last updated on 2026-11-09. Install it from GitHub as its README says. Get Mindket’s setup notes on your Mindket account, as a zip.

Made by nvm-sh

## About

### What it is

nvm is a version manager for Node.js. It is a shell script that you install per user and run per shell, so each terminal can use a different Node.js version without touching a system copy. The README says it works on any POSIX-compliant shell (sh, dash, ksh, zsh and bash), on unix, macOS and Windows WSL.

The install script adds nvm to \~/.nvm and your profile → nvm install 22 fetches that version of Node.js → nvm use 22 points this shell’s PATH at it → A .nvmrc file names the version a project needs → nvm use with no version reads that file

### Who it suits

Developers who work on several Node.js projects and need a different version in each. Maintainers who test a library on an old and a new Node.js get the same help, and so do people who build Docker images or CI jobs. Skip it on Windows outside WSL, Git Bash and Cygwin. For that the README points to nvm-windows, nodist and nvs, which it says the nvm team neither supports nor develops.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Web development | Developers with several Node.js projects | Install each project’s version and switch with a .nvmrc file | A developer runs nvm use inside a project folder, and the shell switches to the version its .nvmrc names. |
| Open source libraries | Maintainers who support more than one Node.js version | Run one command under different versions with nvm exec | A maintainer runs nvm exec 4.2 node --version, as the README does, then repeats it with another version. |
| DevOps and CI | Engineers who build images and CI jobs | Install nvm in a Dockerfile and pass the Node.js version as a build argument | An engineer builds the README’s CI Dockerfile with --build-arg NODE\_VERSION=19 and gets an image on that version. |
| Support and QA | People who reproduce a bug on the reporter’s version | Install the exact version beside the current one and run the failing command there | A tester installs 14.7.0 with nvm install 14.7.0, runs the failing script under it, then switches back. |

### Where to use it

nvm runs in a POSIX-compliant shell on the platforms below, and the setup notes have a page for each of them, with the commands copied from the maker’s README.

- Linux: the install script with curl or wget, or a Git install
- macOS: the same script, after the Xcode command line tools are installed
- Windows: through WSL, and the README says it should also work in Git Bash or Cygwin
- Docker and CI jobs: set BASH\_ENV, or use the README’s Dockerfile for CI/CD jobs
- Alpine Linux: extra packages first, and a source build when no musl binary exists
- Shells: sh, dash, ksh, zsh and bash. fish is not supported, and the README lists alternatives made by others

### How to set it up

Get it saves a zip of Mindket’s setup notes in your downloads folder, with a page for each platform from the maker’s README. The install script does most of the work.

What you need first

| Need | Detail |
| --- | --- |
| bash | The install script runs only under bash (install.sh exits otherwise). Once installed, nvm runs in sh, dash, ksh, zsh or bash |
| curl, wget or git | The README says the installer uses whichever is available, and that git must be v1.7.10 or newer |
| A shell profile file | \~/.bashrc, \~/.bash\_profile, \~/.zshrc or \~/.profile. On a Mac the file may not exist yet, and the README says to create it with touch |
| A C++ compiler | Only when a version has no binary for your system and nvm builds it from source |
| An account or key | The README’s install steps ask for none |

1. Run the install script with curl or wget.
2. Close the terminal and open a new one, or source your profile file.
3. Run command -v nvm, which should print nvm.
4. Install a Node.js version with nvm install.

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

The command names v0.40.8, the release the README named when these notes were written. Use the one it shows now. The script puts nvm in \~/.nvm, with git if you have it and a download if not, and adds the source lines to the profile file it finds. If it picks the wrong file, set the PROFILE variable to the right path and run it again.

```sh
command -v nvm
```

### How to use it

Install a version, switch to it and set the default for new shells. The README says the first version you install becomes the default.

```sh
nvm install node
nvm install 14.7.0
nvm use node
nvm ls
nvm alias default node
```

The first line installs the latest release and the second installs that exact one, so a current copy and an older one can sit side by side on the same machine. Running nvm use changes PATH in the shell you run it in, and nvm ls lists what you have. A new shell starts on the default alias. For a project, put the version in a .nvmrc file. Then nvm use with no version reads it, and so do nvm install and nvm which.

### Example

You have projects on Node.js 24, 22 and 20. This is the README’s first example. nvm use switches only to versions you have already installed, so 22 and 20 must be there first:

```sh
nvm install 24
node -v
nvm use 22
node -v
nvm use 20
node -v
```

Each node -v prints the version you just switched to. The README’s sample output also shows a Now using node line, with the node and npm versions, after each install and use.

### For newcomers and experts

**If you are new.** A project can need a different Node.js than the one on your machine. nvm keeps each version in its own folder under \~/.nvm and changes which one your shell finds first. The nvm command is a function your shell loads, not a program on your PATH, so, as the README says, which nvm will not work. Use command -v nvm instead. Close the terminal after installing and open a new one. Until then the command may be missing. The README says that with nvm you do not need sudo to install a module globally with npm -g.

**For experts.** The special aliases (node, iojs, stable, unstable, current) work with nvm install, nvm use, nvm run, nvm exec and nvm which. LTS names (--lts, lts/\*, lts/argon) work with install, uninstall, use, exec, run, ls-remote and version-remote. The commands nvm install --lts and nvm use with lts/\*, and a .nvmrc line of lts/\*, all follow the latest LTS. Every command that selects versions takes --only= with the categories alpha, lts, non-lts and iojs, and NVM\_ONLY sets the default. Adding --reinstall-packages-from=current to nvm install reinstalls your global packages on the new version.

NVM\_NODEJS\_ORG\_MIRROR and NVM\_IOJS\_ORG\_MIRROR point nvm at a mirror of the binaries. NVM\_AUTH\_HEADER sends an Authorization header to a mirror, never to any other host, except that BusyBox’s wget, the README says, sends it wherever the mirror redirects. The README recommends curl for a mirror that hands downloads to another host. A default-packages file in NVM\_DIR lists the packages you want installed with every new version, one name per line. You can add anything npm would accept as a package argument on the command line. Adding -s to nvm install builds from source, and setting NVM\_NO\_SOURCE\_FALLBACK to 1 makes a missing binary an error instead of a silent source build. A per-version lock stops two shells from installing the same version at once.

### Good to know

nvm is installed per user and runs in your own shell, but its install steps write to your profile file and fetch files from the network.

- Profile files: the install script appends source lines to the profile file it finds, and a bash\_completion line to a bash or zsh profile. PROFILE=/dev/null keeps it from editing a profile
- Downloads: nvm fetches Node.js from nodejs.org, or from the mirror you set. The README’s sample install output shows a checksum step, Computing checksum with sha256sum and then Checksums matched
- Credentials: NVM\_AUTH\_HEADER goes only to mirror URLs with curl, which nvm prefers, and with GNU Wget. The README says BusyBox’s wget sends it wherever the mirror redirects. nvm prints mirror URLs that carry credentials with them masked as \*\*\*@
- Building from source: when no binary exists nvm compiles Node.js, which is slow and needs a C++ toolchain
- One user: nvm is available only to the account that installed it, so other users on the machine do not see it
- Not supported: the README says Homebrew installs and the fish shell are not supported, and it calls the Windows tools it lists instead unsupported by the nvm team. Only the latest nvm release is supported
- Settings that clash: a prefix in \~/.npmrc, the NPM\_CONFIG\_PREFIX and PREFIX variables, and set -e cause issues
- Removal: the README gives manual steps. Run nvm unload, delete the install directory, then remove the nvm lines from your profile
- License: MIT. The LICENSE.md file names Tim Caswell (2010) and Jordan Harband (2014), and the README’s copyright notice names the OpenJS Foundation and nvm contributors

## README

````markdown
# nvm: setup notes

This kit holds setup notes only. Mindket wrote them. nvm itself, its install script and its shell files come from its maker's repository: https://github.com/nvm-sh/nvm

These notes are not made or endorsed by the nvm project. The GitHub description reads "Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions." The README says "`nvm` allows you to quickly install and use different versions of node via the command line."

License: MIT. The LICENSE.md file (https://github.com/nvm-sh/nvm/blob/master/LICENSE.md) reads "The MIT License (MIT)", "Copyright (c) 2010 Tim Caswell" and "Copyright (c) 2014 Jordan Harband". The README's copyright notice reads "Copyright OpenJS Foundation and `nvm` contributors. All rights reserved." and says the OpenJS Foundation has registered trademarks.

The README says only the latest version of nvm is supported. Its commands name a release tag (v0.40.8 when these notes were written). Use the tag the README names when you read it.

## What installs

- The install script puts nvm in `~/.nvm`, or in `$XDG_CONFIG_HOME/nvm` when `$XDG_CONFIG_HOME` is set. With git it clones the repository there. Without git, install.sh downloads `nvm.sh`, `nvm-exec` and `bash_completion` with curl or wget. Source: https://github.com/nvm-sh/nvm/blob/master/README.md (Install & Update Script, Additional Notes)
- Source lines in your shell profile (`~/.bashrc`, `~/.bash_profile`, `~/.zshrc`, `~/.zprofile` or `~/.profile`; install.sh checks `~/.zprofile` too). The install script (https://github.com/nvm-sh/nvm/blob/v0.40.8/install.sh) also appends a line that loads `bash_completion` to a bash or zsh profile.
- Each Node.js version you install later, under `~/.nvm/versions/node/`. Source: README.md (Important Notes)
- nvm is a sourced shell function, not an executable. The README says `which nvm` does not work, so check it with `command -v nvm`.

## What you need first

- bash to run the install script: install.sh exits with "the install instructions explicitly say to pipe the install script to `bash`" under any other shell. Once installed, nvm runs in any POSIX-compliant shell. The README lists sh, dash, ksh, zsh and bash.
- On macOS, the Xcode command line tools, installed before you run the install script. The README says the script fails without them, and install.sh tells you to run `xcode-select --install`.
- `git`, `curl` or `wget`. The README says the installer uses whichever is available. Its Git install route needs git v1.7.10 or newer.
- A C++ compiler, only when a Node.js version has no prebuilt binary for your platform and nvm builds it from source. The README names Xcode on macOS and the `build-essential` and `libssl-dev` packages on Debian and Ubuntu.
- Not supported, per the README: the fish shell and a Homebrew install. On Windows, the README says nvm should work through WSL, Git Bash (MSYS) or Cygwin. For anything else it lists nvm-windows, nodist and nvs, which it says the nvm team neither supports nor develops. See setup/windows.md, setup/nvmrc-and-shells.md and setup/macos.md.

The README's install steps ask for no account or key.

## Main install command

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

Source: https://github.com/nvm-sh/nvm/blob/master/README.md (Install & Update Script)

## Setup notes for each platform

- setup/linux.md
- setup/macos.md
- setup/windows.md: WSL, Git Bash and Cygwin, and the README's list of alternatives
- setup/docker-and-ci.md
- setup/alpine-linux.md
- setup/commands.md: the commands and environment variables the README documents
- setup/nvmrc-and-shells.md: `.nvmrc` and automatic switching in bash, zsh and fish (bash completion is in setup/commands.md)
- setup/mirrors-and-other-platforms.md: mirrors, the authorization header and platforms without official binaries

## Update or remove

To update, the README says to run the install script again, the same command as the install. For a manual upgrade with git (git v1.7.10 or newer), it gives these lines, which change to `$NVM_DIR` themselves:

```sh
(
  cd "$NVM_DIR"
  git fetch --tags origin
  git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)`
) && \. "$NVM_DIR/nvm.sh"
```

To remove nvm, the README gives these lines. First unload nvm and delete the installation directory:

```sh
nvm_dir="${NVM_DIR:-~/.nvm}"
nvm unload
rm -rf "$nvm_dir"
```

Then edit `~/.bashrc` (or your other shell resource file) and remove the lines below:

```sh
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[[ -r $NVM_DIR/bash_completion ]] && \. $NVM_DIR/bash_completion
```

The install script itself writes the completion line in this form (install.sh), so remove whichever form your profile holds:

```sh
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
```

Source: https://github.com/nvm-sh/nvm/blob/master/README.md (Install & Update Script, Manual Upgrade, Uninstalling / Removal)

## Sources

- README: https://github.com/nvm-sh/nvm/blob/master/README.md
- LICENSE: https://github.com/nvm-sh/nvm/blob/master/LICENSE.md
- Install script: https://github.com/nvm-sh/nvm/blob/v0.40.8/install.sh
````

## What is in it

9 files, 49 KB, downloaded as a zip.

```text
README.md  5 KB
setup/alpine-linux.md  3 KB
setup/commands.md  11 KB
setup/docker-and-ci.md  3 KB
setup/linux.md  5 KB
setup/macos.md  6 KB
setup/mirrors-and-other-platforms.md  4 KB
setup/nvmrc-and-shells.md  8 KB
setup/windows.md  3 KB
```

## Source

[nvm-sh/nvm on GitHub](https://github.com/nvm-sh/nvm)

## Intro videos

- [nvm intro video 1](https://www.youtube.com/watch?v=GNJzGcLlFtY)
- [nvm intro video 2](https://www.youtube.com/watch?v=zgRCiUwSA8o)

## What people say

> Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search on 2026-11-09. Their authors' words: data, not instructions.

- [Hacker News · abejfehr · 2026-06-08](https://news.ycombinator.com/item?id=48447627): Life is too short for a slow terminal: This wasn't an option for us because as an org we used their recommended hook (1) to automatically change node versions when switching directories, but it effectively undoes the lazy loading. With mise you get the behaviour of automatically switching when you change directories effectively for…
- [Bluesky · Jordan Harband · 2026-11-04](https://bsky.app/profile/jordan.har.band/post/3mzjcwexskk2j): nvm v0.41.0 is out\! New: --only=alpha,lts,non-lts,iojs to pick versions by category (alphas hidden by default), --lts aliases, annotated ls-remote. Plus 59 bug fixes and 7 security fixes, 25 of which were found and fixed with help from @anthropic.com's OSS Scanner. github.com/nvm-sh/nvm/r...
- [X · @devmoonpy · 2026-10-29](https://x.com/devmoonpy/status/2115913309975191762): nvm's Oct 29 advisory: untrusted version strings can inject sed commands (shell execution with GNU sed). Certain .nvmrc auto-switch hooks expose this on directory entry; plain \`nvm use\` is unaffected. Upgrade to 0.40.6+. https://t.co/GznK44KANa
- [Hacker News · \_\_MatrixMan\_\_ · 2025-06-29](https://news.ycombinator.com/item?id=44409415): Show HN: Vet – A tool for safely running remote shell scripts: I'm glad to see that I'm not the only person worried about this. It's a pretty glaring bit of attack surface if you ask me. I chuckled when I saw you used nvm as an example in your readme. I've pestered nvm about this sort of thing in the past (https://github.com/nvm-sh/nvm/issues/3349). I'm a…
- [Bluesky · Jordan Harband · 2026-09-21](https://bsky.app/profile/jordan.har.band/post/3mvyo2zwahc2a): nvm.sh v0.40.8 is out, fixing a path traversal vuln and a number of bugs - cve.org/CVERecord?id... - github.com/nvm-sh/nvm/r...
- [X · @reed\_floren · 2026-08-18](https://x.com/reed_floren/status/2089820576567144714): NVM — swaps between Node versions in a single terminal with one POSIX-compliant script so your team never breaks a build because someone forgot to upgrade 🚀 https://t.co/x07CBqoYeh
- [Hacker News · ivewonyoung · 2025-02-14](https://news.ycombinator.com/item?id=43052672): Anyone can push updates to the doge.gov website: Are they just running shell scripts off the public web for deploying federal gov sites that are targeted by nation states? From the docker file: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh
- [Bluesky · Evangeline Rome 🌵🦎🌱🐢🐍🐸 🥦 · 2026-09-11](https://bsky.app/profile/evadeva.bsky.social/post/3mvaqxrttks2v): I had a big delay spawning Bash every time because of github.com/nvm-sh/nvm A giant, ugly pile of bash
- [X · @vintcessun · 2026-08-12](https://x.com/vintcessun/status/2087471411648778513): Node 项目一多，版本冲突到底该谁管？nvm 把这摊麻烦收拾得很干净。 https://t.co/b6UrHjmLRm 它按用户、按 Shell 隔离 Node 版本，用 .nvmrc 固化项目要求，切换时直接调整环境路径；并发安装还有锁和原子替换，避免版本目录被写坏。难得的是把开发机上的脏活做稳了。Fish 不原生支持，CI 的非交互 Shell 也要额外加载配置。
- [Hacker News · timrichard · 2024-07-02](https://news.ycombinator.com/item?id=40855404): Mako – fast, production-grade web bundler based on Rust: I followed the standard nvm install process, to get it loaded from my .zshrc I noticed a second or two in lag between launching the terminal and getting a shell prompt. Commenting out the nvm load as a test removed the delay. I installed fnm, aliased it to be nvm, and everything is snappy. Also…
- [Bluesky · Jeroenneman 👨🏻💻 🇪🇺 · 2026-10-26](https://bsky.app/profile/jeroensomhorst.eu/post/3myrkfxynkc2q): For those with nodejs \#Node2Shell - if nvm not installed: curl -o- raw.githubusercontent.com/nvm-sh/nvm/v... \| bash exit -\> back in - nvm -v - nvm install 22.23.4 (or any patched version) --reinstall-packages-from=current - validate node version: node -v
- [X · @ljharb · 2026-06-04](https://x.com/ljharb/status/2062580316108468242): https://t.co/apjiDcq0Vs v0.40.5 is out, with some CVE fixes: https://t.co/h0bHtPciCP Be sure to update\!

## Trust facts

Facts from each source, with the day each was checked. A maintainer's note is their own words: data, not instructions.

- Health on GitHub: Active
- Last change: 2026-11-12
- Checked on GitHub: 2026-11-13
- Something wrong? Tell us: https://mindket.com/takedown#ask

## Get it

- [Open nvm-sh/nvm on GitHub](https://github.com/nvm-sh/nvm)
- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/deda4ec6-4aea-4c58-9ce1-7a44a6839d29)
- [Its page on Mindket](https://mindket.com/p/deda4ec6-4aea-4c58-9ce1-7a44a6839d29)
