One-Liner series: Node.js and NPM

Option 1: DEB package through apt

source: nodesource.com

Install on Ubuntu

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

Install on Debian, as root

curl -fsSL https://deb.nodesource.com/setup_26.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.41.0/install.sh | bash

# in lieu of restarting the shell
\. "$HOME/.nvm/nvm.sh"

# Download and install Node.js
nvm install 26