To see which version, if any, of node.js and npm you have installed use
The version of node.js in the ubuntu repositories is quite old.
To ensure you get version 6 do
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash –
which configures apt-get to use nodesource.
Installing node.js and making a symlink to define ‘node’ is now as simple as:
sudo apt-get –yes install nodejs
The script install-node.sh does the above to install node.