How to Install Latest Node.js and NPM on Ubuntu with PPA Step By Step

INTRO:

Node.js is a server-side platform built on Google Chrome’s JavaScript Engine. it is an open source, cross-platform runtime environment for developing server-side and networking applications.it applications are written in JavaScript, and can be run within the Nodejs runtime on OS X, Microsoft Windows, and Linux.

We use node.js Ubuntu 19.04, 18.04 LTS, 16.04 LTS (Trusty Tahr) and 14.04 LTS (Xenial Xerus) systems and install nodejs on Linux VPS with easy commands.

Step 1 – Add Nodejs PPA Using This Command

Node.js package is available on LTS and the CURRENT RELEASE. Now its our choice to select which version we want to install on the system as per our requirements.  Here you add the PPA to your system to install Nodejs on Ubuntu

Current Release: We use this command for installing the Nodejs current release;

$ sudo apt-get install curl python-software-properties

$ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -

LTS Release:  We use this command for installing the Node.js LTS release;

$ sudo apt-get install curl python-software-properties
$ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
$ sudo apt-get install curl python-software-properties

$ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

Here, we use the latest current release and added their PPA to our Ubantu Server/Ubantu Desktop

.Step 2 – Install Node.js on Ubuntu

Now You have successfully added Nodejs PPA to Ubuntu Server/Ubantu Desktop. After that You execute the  given below command, install Nodejs using apt-get. It will also install NPM with nodejs. This command also install many other dependent Nodejs package on your system.

$ sudo apt-get install nodejs

Step 3 – Check Node.js and NPM Version

After installing nodejs verify and check the installed version. You can find more details about current version on node.js official website.

$ node -v
v12.3.1

Using this command to check the npm version

$ npm -v
6.9.0

All Done 🙂

 

Also Read : How to install lets encrypt

 

Leave a Reply

Your email address will not be published. Required fields are marked *