Skip to content

Install NodeJS on Ubuntu 19.04

In this tutorial, I’m going to show you how to install Node.js on Ubuntu 19.04 / 18.04. Once you are done, you’ll have Node.js installed and be ready to start building NodeJs apps.

Supported Ubuntu versions

NodeSource will maintain Ubuntu distributions in active support by Canonical, including LTS and the intermediate releases.

  • Ubuntu 14.04 LTS (Trusty Tahr) – not available for Node.js 10 and later
  • Ubuntu 16.04 LTS (Xenial Xerus)
  • Ubuntu 18.04 LTS (Bionic Beaver)
  • Ubuntu 18.10 (Cosmic Cuttlefish)
  • Ubuntu 19.04 (Disco Dingo)

Step 1: Add Node.Js PPA to your Ubuntu system

sudo apt-get install software-properties-common
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -

Step 2: Install NodeJS on Ubuntu using apt-get

sudo apt-get install -y nodejs

This command also installs NodeJS Package Manager (NPM) and other dependencies.

Step 3: Verifying the version of NodeJS and NPM

To check NodeJs version:

node -v

To check NPM version:

npm -v

That’s it. You now have NodeJs installed in your Ubuntu machine. If you want to run a program in NodeJs, just enter node filename.js.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.