Because I recently planned to study nodejs, I found that there is no tutorial for installing and updating nodejs on the Internet that is suitable for first time.
First execute it on the command line of ubuntu:
apt-get install nodejs
Then we need to install npm, which is the version management tool used for nodejs:
apt-get install nodejs
Then we can use node -v to view the version. If we find that the version is very low (as of the time this blog is completed, it is v0.12.2), go to the official website/download/, download the Linux Binaries (.) version of the compressed package in this page.
Then use administrator permissions to replace the things in this to the default installation directory of apt-get.
Such as in the usr folder.
Execute node -v again and find that the version has been updated.
The above is all the content shared by this article, I hope you like it.