Install Node.js on Ubuntu/Debian

To install Node.js on Ubuntu, first set up repository as per your version requirements.

For NodeJs v24.x

curl -sL https://deb.nodesource.com/setup_24.x | bash -
apt-get install -y nodejs build-essential

For NodeJs v22.x

curl -sL https://deb.nodesource.com/setup_22.x | bash -
apt-get install -y nodejs

For NodeJs v21.x

curl -sL https://deb.nodesource.com/setup_21.x | bash -
apt-get install -y nodejs

For NodeJs v20.x

curl -sL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs

For NodeJs v18.x

curl -sL https://deb.nodesource.com/setup_18.x | bash -
apt-get install -y nodejs

For NodeJs v17.x

curl -sL https://deb.nodesource.com/setup_17.x | bash -
apt-get install -y nodejs

For NodeJs v16.x

curl -sL https://deb.nodesource.com/setup_16.x | bash -
apt-get install -y nodejs

For NodeJs v15.x

curl -sL https://deb.nodesource.com/setup_15.x | bash -
apt-get install -y nodejs

For NodeJs v14.x

curl -sL https://deb.nodesource.com/setup_14.x | bash -
apt-get install -y nodejs

For NodeJs v12.x

curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt-get install -y nodejs

For NodeJs v11.x

curl -sL https://deb.nodesource.com/setup_11.x | bash -
apt-get install -y nodejs

Node.js v10.x

curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get install -y nodejs

Node.js v9.x

curl -sL https://deb.nodesource.com/setup_9.x | bash -
apt-get install -y nodejs

Node.js v8.x

curl -sL https://deb.nodesource.com/setup_8.x | bash -
apt-get install -y nodejs

Node.js v6.x

curl -sL https://deb.nodesource.com/setup_6.x | bash -
apt-get install -y nodejs

Install build-essential package

apt install -y build-essential

See Node.Js

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *