Node.js is a platform built on Chrome’s JavaScript runtime to build fast and scalable network applications. The latest version of the Node.js PPA is maintained by its official website.
This PPA can be added to the Ubuntu system to install Node.js with a few simple commands.
The Node.js package is available in the LTS release and the current release. It’s up to the user to select the version of Node that is required. Run the following command to add the PPA to the Ubuntu system:
sudo apt-get install curl
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - &&\
16.x is the latest LTS version of node available.
After successfully adding the PPA to the system, execute the command below to install Node on Ubuntu:
sudo apt-get install nodejs
To verify any installation, check the version number of the installed software. For node, run the following command:
node -v
If the correct version number is displayed on the terminal, the installation of Node on your system was successful.