I was recently going through the version of node in my ubuntu 16.04 when node -v
command was used it shows me version 6.9.1 but when nodejs -v
it shows 6.9.2 previously before using this commands npm update
command was used.
Now what's these difference in node -v
and nodejs -v
? and how to update to the latest LTS version of node/nodejs?
To update, you can install n
sudo npm install -g n
Then just :
sudo n latest
or a specific version
sudo n 8.9.0