# lists all versions
nvm ls-remote
# installs the version you want (in this case version 14.0.0)
nvm install v14.0.0
# use the version that you installed as the default
nvm use v14.0.0
First install NVM - https://stackoverflow.com/questions/25654234/node-version-manager-nvm-on-windows -2.nd answer
nvm install latest
nvm use 15.4.0 [instead of 15.4.0 use whatever number cmd spills on you]
#First install the script and run it
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh| bash
#then set VARIABLE and PATH in Bash to load nvm
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
#verify installation
command -v nvm
#install nodeJs
nvm install --lts
#this command will install long time support(lts) nodeJs also npm with it
// v0.39.1
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
// "node" is an alias for the latest version
nvm install node