Install NVM (Node Version Manager) with following command
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash
Now Install Node with following command
nvm install version etc. nvm install 6.9.2
- nvm list: To list installed node versions
- nvm ls-remote: To list all node versions
- nvm use: To switch node version
- nvm alias default version: etc nvm alias default 6.9.2 To set a default Node version to be used in any new shell