Docs / Programming & Development / How to Install Node.js on Ubuntu

How to Install Node.js on Ubuntu

By Admin · Feb 25, 2026 · Updated Apr 24, 2026 · 373 views · 1 min read

Install Node.js using the official NodeSource repository for the latest LTS version.

Using NodeSource

curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -\napt install nodejs -y

Verify

node -v\nnpm -v

Using nvm (Node Version Manager)

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash\nsource ~/.bashrc\nnvm install --lts\nnvm use --lts

Install Yarn

npm install -g yarn

Was this article helpful?