How-to's How to install Node.js1. Update and upgrade the packages- sudo apt update && sudo apt upgrade
2. Download and install Node.js from the NodeSource repository# Download the Node.js setup script- curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh
# Run the Node.js setup script with sudo- sudo -E bash nodesource_setup.sh
# Install Node.js- sudo apt-get install -y nodejs
3. Verify the Node.js installation