Skip to content

How to install node.js on ubuntu

Asterios Raptis edited this page May 5, 2019 · 1 revision

Prerequisites

Make sure that the user that will install node.js have sudo privileges.

Node.js and all other packages are available from the Ubuntu 18.04 distribution repository.

Update the packages with the following command:

sudo apt update

Now you can start install it:

sudo apt install nodejs npm

Confirm all questions with yes for install and after you can verify with following command:

nodejs --version

The output can look something like this:

v8.10.0

For install npm type the following command:

sudo apt install npm

Verify the installation by typing the following command:

npm --version

The output can look something like this:

3.5.2

That's it folks.

Clone this wiki locally