Install:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
Configuration: add below to .bashrc .bash_profile
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
Using:
nvm alias default system # Set existing node installed in the system as default
nvm install --lts # install latest LTS version node
nvm use --lts # Use LTS version of node only for the current session