Node.js is a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications. Latest version is maintaining by its official website.
We can add this PPA to your Ubuntu 19.10, 18.04 LTS, 16.04 LTS (Trusty Tahr) and 14.04 LTS (Xenial Xerus) systems and install node.js on Linux VPS with easy commands.To install specific nodejs version, Visit our tutorial.Step 1 – Add Node.js PPANode.js package is available in the LTS release and the current release. It’s your choice to select which version you want to install on the system as per your requirements. Let’s add the PPA to your system to install Nodejs on Ubuntu.Use Current Release: At te last update of this tutorial, Node.js 13 is the current Node.js release available. Sudo apt-get install curlcurl -sL sudo -E bash -Use LTS Release: At the last update of this tutorial, Node.js 12.x is the LTS release available.
Ubuntu Terminal Commands
Sudo apt-get install curlcurl -sL sudo -E bash -For this tutorial, I am using the latest current release and added their PPA to my system. Step 2 – Install Node.js on UbuntuYou can successfully add Node.js PPA to the Ubuntu system. Now execute the below command install Node on and Ubuntu using apt-get. This will also install NPM with node.js. This command also installs many other dependent packages on your system.
Sudo apt-get install nodejsStep 3 – Check Node.js and NPM VersionAfter installing node.js verify and check the installed version. You can find more details about current version on node.js.
Node -vv13.3.0Also, check the npm version npm -v6.13.1Step 4 – Create Demo Web Server (Optional)This is an optional step. If you want to test your node.js install.
Install Node Js Ubuntu Using Command Line
Let’s create a web server with “Hello World!” text. Create a file server.js vim server.jsand add the following content.