NVM stands for Node Version Manager. It is a command-line utility that allows you to manage multiple versions of Node.js on a single machine. NVM is particularly useful when you need to work on projects that require different Node.js versions, as it enables you to easily switch between them.
First, install NVM:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
After installing NVM, close and reopen your terminal or run:
source ~/.bashrc
Then, install Node.js with NVM:
nvm install <node-version>
<node-version>
with the desired Node.js version. After installation, switch to that version:
nvm use <node-version>
Verify the installation by checking the version of Node.js.
node -v
Example Output : 15.0.0
0 Comments