how to install nodejs and npm in ubuntu and windows

installation of nodejs and npm

Installation procedure of NodeJs in Ubuntu

  1. Add NodeJS PPA to Ubuntu with below command. It required curl package for ubuntu

    # install curl with below command
    sudo apt-get install curl
    
    sudo apt-get install python-software-properties 
    curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
    
  2. Install NodeJs and NPM with below command

    sudo apt-get install nodejs
  3. Check whether NodeJs and NPM installed or Not

    node -v
    npm -v

Installation procedure of NodeJs in Windows

  1. Visit NodeJs official web page https://nodejs.org/en/download/ and click on windows installer icon and download it.

  2. After downloading the file(.msi) run it. It will ask for acceptance of  license and terms of service, just accept it.

  3. To check the installation, Just open the command line and type the below commands

    node -v
    npm -v 
  4. you can see the version of node and npm If NodeJs & NPM installed successfully. 

Please comment below If you get any errors.