Linux (CentOS/RHEL using yum)

  1. Add Node.js Yum Repository:
  curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash -
  
  1. Install Node.js and npm:
  sudo yum install -y nodejs
  
  1. Verify Installation:
  node -v
npm -v
  

Linux (Ubuntu/Debian using apt)

  1. Add Node.js PPA (Personal Package Archive):
  curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
  
  1. Install Node.js and npm:
  sudo apt install -y nodejs
  
  1. Verify Installation:
  node -v
npm -v
  

macOS

  1. Install Node.js with Homebrew:
  brew install node
  
  1. Verify Installation:
  node -v
npm -v
  

Windows

  1. Download Node.js Installer:

  2. Run Installer:

    • Run the downloaded .msi installer and follow the installation wizard instructions.
  3. Verify Installation:

    • Open Command Prompt or PowerShell and check Node.js and npm versions:
  node -v
npm -v