nvm (Node Version Manager)
The most widely used tool for installing and switching between Node.js versions per project on macOS, Linux and WSL. Its README is the official install and usage guide. Keeps Node out of system folders, so you never need sudo for npm.
95.2k
GitHub · Sept 2026
Tool
Web Development
nvm-sh
15 minutes to set up
Beginner
Free
What it is
nvm is a version manager for Node.js: a shell script that installs several Node versions side by side in your home folder and switches between them. nvm install 22 installs a version, nvm use 22 switches the current shell to it, and a .nvmrc file in a project records which version that project expects, so nvm use picks it automatically. The project's README on GitHub is the official documentation.
Why use a version manager
Different projects need different Node versions, and upgrading the one system-wide Node breaks older projects. Installing Node through nvm also keeps it inside your home folder, which means global npm packages install without sudo. Using sudo with npm is one of the most common ways beginners end up with root-owned files and permission errors. nvm works by putting the chosen version first on your PATH, which is also a good lesson in how PATH works.
Platform notes
The README lists Unix, macOS and Windows WSL as its platforms. It does not run in Windows PowerShell or Command Prompt; Windows developers working in WSL should install it inside their Linux distribution. Separate, unrelated projects exist for native Windows, which the nvm maintainers neither develop nor support.
Installing it
The README gives an install script (run with curl or wget) that clones nvm into ~/.nvm and adds a few lines to your shell startup file. Open a new terminal afterwards, or source your startup file, and check with command -v nvm. On a Mac, note that the README says installing nvm through Homebrew is not supported; use the README's own method.
Everyday commands
nvm install --ltsfor the current long-term support releasenvm lsto list installed versionsnvm useinside a project with a.nvmrcnvm alias default 22to set the version for new shells
Is it worth it?
Yes, for anyone writing JavaScript or TypeScript outside the browser. Alternatives such as fnm, Volta and mise exist and some are faster; any of them is better than a single system-wide Node.
Common questions
Does it slow down my shell? Loading nvm adds a little start-up time; the README documents lazy-loading options.
Is it free? Yes, it is open source under the MIT licence.
Ready to start?
Opens on nvm-sh in a new tab.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.