DEV Community

Cover image for Install Node.js on Ubuntu server
Dalitso Kasonde
Dalitso Kasonde

Posted on

Install Node.js on Ubuntu server

Here we install node.js using nodesource on a vps server

To begin ssh to your vps and type

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

The above command helps add the desired node repository to allow you to install any given version. For this article, we are using node version 12

Next we install node.js with the following command

sudo apt install nodejs

After command is run, check the version of node.js installed

node --version

Node.js is typically install with npm(node package manager) you can check the version of npm installed using the following command

npm --version

Top comments (0)