Saturday, January 18, 2025How to install Node.js
Keven Client A. Cataluña @LinkedIn
Introduction

This guide provides step-by-step instructions for installing Node.js on Debian or Ubuntu-based systems using the official NodeSource repository.

Node.js 20Node.js 22
Steps1. Update and upgrade the packages
    sudo apt update && sudo apt upgrade
  
2. Download and install Node.js from the NodeSource repository Download the setup script
    curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh
  
Run the setup script
    sudo -E bash nodesource_setup.sh
  
Install Node.js
    sudo apt-get install -y nodejs
  
3. Verify the Node.js installation
    node -v
  
      v22.4.1