Home > Article > Web Front-end > How to install nodejs and upgrade under ubuntu_node.js
Because I recently planned to study nodejs, I found that there is no suitable installation and update tutorial for nodejs on the Internet
First execute under the command line of ubuntu:
apt-get install nodejs
Then we need to install npm, which is the version management tool for nodejs:
apt-get install nodejs
Then we can use node -v to check the version. If we find that the version is very low (as of the completion of this blog post, it is v0.12.2), go to the official website https://nodejs.org/download/ , download the Linux Binaries (.tar.gz) version of the compressed package from this page.
Then use administrator rights to replace the contents here to the default installation directory of apt-get.
Such as in the usr folder.
Execute node -v again and you will find that the version has been updated.
The above is all the content shared with you in this article. I hope you will like it.