Skip to the content.

Install Latest NodeJS In Linux

We can get latest version of NodeJS by -

Setup

Setting APT Repositories

$ curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -

Note: This will setup NodeJS 16 on the system.

Installing NodeJS

$ sudo apt-get install -y nodejs

This will install NodeJS and NPM.

Source: JoshTronic

Reference(s)