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 https://deb.nodesource.com/setup_10.x | 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
Output

v8.10.0

Check NPM version.

$ npm --version 
Output

3.5.2

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 hostingride.in. 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+