How to install node.js and NPM on ubuntu

install node.js and npm on ubuntu


What is NPM?

NPM is default package manager for the JS (JavaScript) environment node.js. Following process show you how to install nodejs and NPM.

Install nodejs and npm from the source repository.

Step 1 - First run the following Update command.

$ sudo apt-get update

Step 2 - Enable the repository with the following curl command.

$ curl -sL | sudo -E bash - 

Step 3 - Node repository now enabled. Now install node.js and npm with following command.

$ sudo apt install nodejs

node.js and npm both installed. Now check version with following command.


Check node version.

$ nodejs --version


Check NPM version.

$ npm --version 


That’s it! Thanks for visit hostingride

You may also checked


Blog type: 

Add new comment

Authored By

Sandeep Gurjar

Hy all, This is Sandeep Gurjar am the founder of I am a Redhat Certified Engineer (RHCE) / AWS Solutions Architect-Associate and working as an system administrator since 2016.

Follow us on

Facebook​  Twitter  LinkedIn  Google+