Manage Node Versions With nvm
Install Node releases and switch between them in a shell.
Run nvm install --lts to install the latest LTS Node, then nvm use --lts to activate it.
01Command
Command
$ nvm install --lts && nvm use --lts02What it does
nvm is a shell function that installs Node versions under ~/.nvm and rewrites PATH to the selected one. A .nvmrc file per project lets nvm use read the required version, and nvm exec runs a command under a specific version.
03Risk
!Warning: nvm is a shell-sourced script, so it must be loaded in each shell; tools that spawn non-interactive shells may not see the selected Node.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Homebrew formula: nvmEvidence: Manage multiple Node.js versions. Packages nvm, the long-standing Node Version Manager shell script.
Last verified: 2026-09-22 · Category: Developer