NVM is Node Version Manager, to manage Node.js on Linux or other systems NVM plays an important role.
Step 1: Install NVM
The very first Step is to install NVM on system, so just hit this command.
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
Step 2: Verify the installation
After executing first step, you need to verify the installation, so to verify the NVM
$ command -v nvm
$ nvm -v
Step 3: install Node.js
After verifying the installation of NVM, you could install Node.js using this command.
$ nvm install node
Now you have successfully installed Node.js on your system. To check how many versions of Node.js installed, execute this command.
$ nvm ls
And if you want to use specific version of Node.js to use, try this command.
$ nvm use 16.1.0
Find the official Documentation of NVM