Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

install
node
ubuntu
linux
node.js

How to install Node.js on Ubuntu

Educative Answers Team

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.

Step 1 - Add Node.js ppa

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 -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -

12.x is the​ latest LTS version of node available.

Step 2 - Install Node.js on Ubuntu

After successfully adding the PPA to the system, execute the command below to install Node on Ubuntu:

sudo apt-get install nodejs

Step 3 - Verification

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.

RELATED TAGS

install
node
ubuntu
linux
node.js
Copyright ©2022 Educative, Inc. All rights reserved
RELATED COURSES

View all Courses

Keep Exploring