curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bashThe script clones the nvm repository to ~/.nvm and adds the source line to your profile (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc).
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvmcommand -v nvmnvm install nodenvm use node
nvm ls