Skip to main content
nvm (Node Version Manager) allows you to install and manage multiple versions of Node.js on your system.
1

Install nvm

Download and install nvm using the official install script:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
source ~/.bashrc
This downloads the latest version of nvm and adds it to your shell configuration.
2

Verify nvm installation

Check that nvm was installed successfully:
nvm --version
You should see output similar to 0.39.3.
3

Install latest LTS Node.js

Install the latest Long Term Support (LTS) version of Node.js:
nvm install --lts
This installs the most recent LTS version available.
4

Check installed version

Verify that Node.js and npm are working:
node -v && npm -v
This command shows both Node.js and npm versions.

Additional nvm commands

List available Node.js versions

nvm list-remote

Install specific version

nvm install 18.17.0

Switch between versions

nvm use 18.17.0

Set default version

nvm alias default 18.17.0

List installed versions

nvm list

Next Steps

Now that you have nvm installed, you can:
  • Install multiple Node.js versions
  • Switch between versions easily
  • Use different versions for different projects
  • Keep your Node.js installations organized

Build docs developers (and LLMs) love