Skip to content
This repository has been archived by the owner on Jun 15, 2024. It is now read-only.

Latest commit

 

History

History
22 lines (22 loc) · 676 Bytes

INSTALL NODE 21v.md

File metadata and controls

22 lines (22 loc) · 676 Bytes

Install Node 21v in Ubuntu

Note: run the command in sudo or su user.

Update your System

sudo apt update
sudo apt upgrade

Install Node21

sudo apt install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_21.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt update
sudo apt install nodejs -y
sudo  npm install -g npm@latest

Check the version

node --version
npm --version