
Node.js is an asynchronous event-driven JavaScript runtime built on Chrome’s V8 JavaScript engine. It runs at the server-side. It mainly used for easily building fast and scalable network applications. In this article, you will find ways to install Nodejs on Ubuntu Linux.
In this tutorial, we will install the node.js in Ubuntu using two different ways. The first method is by using Ubuntu’s Official repository and second is by using the nodesource repository.
Nodejs latest version
At the time of writing this article, the latest version of the nodejs is 13. But we will install the LTS version of nodejs which is version 12. However, if we install the nodejs using Ubuntu’s Official repository, then we will not get the latest version of nodejs.
Official repository of Ubuntu 18.04 LTS is having nodejs version 8.10 and Ubuntu 16.04 LTS is having version 4.2. However, if you want to install the latest version or the LTS version of nodejs then you have to use the nodesource repository.
Install Nodejs on Ubuntu using Official repository
For this tutorial, we are using Ubuntu 18.04. However, you can follow the same steps for other versions of Ubuntu.