Also, since nvm uses the name "node" instead of "nodejs", make sure that the unrelated program also named "node" -- the Amateur Packet Radio -- does not already exist on your system.
sudo apt-get install git build-essential libssl-dev curl git-corewget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.23.3/install.sh | bash(I determined the latest nvm version available -- and a lot of other, really helpful information -- at: https://github.com/creationix/nvm)
To have nvm automatically sourced, accessible at login:
vi ~/.bashrcAnd add this to the end:
source ~/.nvm/nvm.shNow, as root (of course):
vi /etc/bash.bashrcAnd add this to the end:
export NVM_SYMLINK_CURRENT=true(close your terminal sessions and log back in - not as root)
nvm install stable
nvm use stableTo set a default version to be used in any new shell, use the alias 'default':
nvm alias default stable