Skip to main content
  1. Posts/

Install Node.js Binary Distribution

··152 words·1 min·

Requirements #

curl #

Install curl:

apt install curl

LTS version #

Debian #

curl -fsSL "https://deb.nodesource.com/setup_lts.x" | bash - &&\
apt-get install -y nodejs

Ubuntu #

curl -fsSL "https://deb.nodesource.com/setup_lts.x" | sudo -E bash - &&\
sudo apt-get install -y nodejs

current version #

Debian #

curl -fsSL "https://deb.nodesource.com/setup_current.x" | bash - &&\
apt-get install -y nodejs

Ubuntu #

curl -fsSL "https://deb.nodesource.com/setup_current.x" | sudo -E bash - &&\
sudo apt-get install -y nodejs

v21.x version #

Debian #

curl -fsSL "https://deb.nodesource.com/setup_21.x" | bash - &&\
apt-get install -y nodejs

Ubuntu #

curl -fsSL "https://deb.nodesource.com/setup_21.x" | sudo -E bash - &&\
sudo apt-get install -y nodejs

v20.x version #

Debian #

curl -fsSL "https://deb.nodesource.com/setup_20.x" | bash - &&\
apt-get install -y nodejs

Ubuntu #

curl -fsSL "https://deb.nodesource.com/setup_20.x" | sudo -E bash - &&\
sudo apt-get install -y nodejs

v18.x version #

Debian #

curl -fsSL "https://deb.nodesource.com/setup_18.x" | bash - &&\
apt-get install -y nodejs

Ubuntu #

curl -fsSL "https://deb.nodesource.com/setup_18.x" | sudo -E bash - &&\
sudo apt-get install -y nodejs