Install nodejs in ubuntu and how to upgrade it.
Because I recently planned to study nodejs, I found that there is no installation and update tutorial for nodejs on the Internet.
First, run the following command in the ubuntu command line:
Apt-get install nodejs
Then we need to install npm, which is the version management tool used by nodejs:
Apt-get install nodejs
Next we can look at the version with node-v, if you find that the version is very low (by the end of this blog is v0.12.2), to the official website https://nodejs.org/download/, this page to download Linux Binaries (.tar.gz) version.
Then, use the Administrator permission to replace the above with the default installation directory of apt-get.
For example, in the usr folder.
Run node-v to check that the version has been updated.
The above is all the content shared in this article. I hope you will like it.