Install latest Node.js version in ubuntu 20.04

 

Node.js is an opensource JavaScript based framework for server-side scripting.

Ubuntu Repository has the older version of node.js

To get the updated version you need to install node.js using the PPA by provided by NodeSource.

for 14.x versions (LTS version)

curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -

for 15.x versions (current active release)

curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -

after this the PPA will be added and repository will be updated automatically,

now install the updated node.js version

sudo apt-get install nodejs

Check after installation

node --version
v14.15.1

This will also install npm, which is node package manager.

Leave a Reply

Your email address will not be published.