How to Install NodeJS and Npm on Ubuntu 18.04 Desktop

Node.js is a Javascript Which helps us to Build a Lightweight Web apps and Applications.

In our Previous Tutorial, we see about Installation Method for PHP Composer on Ubuntu 18.04 Desktop.

In this Tutorial, we see the Method to Install NodeJS and Npm on Ubuntu 18.04 Desktop.

How to Install Nodejs and Npm on Ubuntu 18.04?

  • Update the Package Manager
sudo apt-get update
  • Now install Python Software Properties
sudo apt-get install python-software-properties
  • Next, Install Node.js Official Setup package via Curl
  • Nodejs having Two LTS Version 10.x or 12.x you can install any one of them
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - 

or

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - 
  • Final Step Install Node.js Packages and npm
sudo apt-get install nodejs
  • That’s all Successfully we install the Node.js and NPM on Ubuntu
  • Check the Node.js & Npm Version by Running this Below Commands
node -v 
npm -v

Hope this tutorial Help you to Install Node.js and Npm on your Ubuntu Desktop.If you Have any doubts in Nodejs Installation Just drop you Comments here I will Help you.