[one-liner] Install Node.js and NPM

Install nodejs and npm on ubuntu using one line of command

One-Liner series: Node.js and NPM

Option 1: DEB package through apt

source: nodesource github

Install on Ubuntu

curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt install -y nodejs

Install on Debian, as root

curl -fsSL https://deb.nodesource.com/setup_24.x | bash -
apt install -y nodejs

Option 2: Through NVM (Node Version Manager)

source: nodejs.org

# Install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash

# Download and install Node.js
nvm install 24
Built with Hugo
Theme Stack designed by Jimmy