# 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
sudo npm install -g nvm
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
# step1
sudo apt-get install build-essential
# step2
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
# or
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.38.0/install.sh | bash
#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
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
curl -sL https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh -o install_nvm.sh
// 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
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
// Install node version
nvm install 14.20.0
// Turn on nvm
nvm on
// Check lsit of installed node versions
nvm list
// Use node version
nvm use 14.20.0
nvm install --lts
nvm install 10.9.0
CopyCopy
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
Copy
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
// Ex:
nvm install v12.13.1
nvm install lts
$ nvm install node