Install Node Js and NPM Ubuntu 18.04/20.04/22.04 Command Line

Install Node Js and NPM Ubuntu 18.04/20.04/22.04 Command Line

Install Node Js & NPM in Ubuntu 18.04, 20.04 and 22.04. In this article, we’ll show you how to install Node Js & NPM on Ubuntu. NPM is a node package manager. NPM is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently. It is extremely configurable to support a wide variety of use cases. Most commonly, it is used to publish, discover, install, and develop node programs.

After install npm and node js on ubuntu, we will run the simple command check the version of installed node js & npm on ubuntu system.

What is Node.js?

  • It is an open source server environment
  • It is free
  • Node.js runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
  • Node.js uses JavaScript on the server

What Can Node.js Do?

  • It can generate dynamic page content
  • It can create, open, read, write, delete, and close files on the server
  • Node.js can collect form data
  • It can add, delete, modify data in your database

Install Node Js and NPM Ubuntu 18.04/20.04/22.04

Steps to install js and npm in ubuntu 18.04/20.04/22.04 using command line or terminal:

Step 1: Update apt packages

before installing the Node js & NPM on Ubuntu. First update the apt package:

sudo apt-get update

sudo apt-get upgrade 

Step 2: Add Node.js PPA

PPA (Personal Package Archives) is Python software libraries. Before install node js & npm on ubuntu, first install PPA in our ubuntu system. Using this below commands.

sudo apt-get install python-software-properties

curl -sL | sudo -E bash -

Step 3: Install Node.js and NPM On Ubuntu

After adding PPAs in our system. we need to run the below command for installing node js & npm on Ubuntu.

For Install Node js on Ubuntu :

sudo apt-get install nodejs

For Install NPM on Ubuntu

sudo apt-get install npm

Step 4: Test Version

After completing the installation process. We need to check the version.

Check the installed Node js version :

nodejs  -v

Check the Installed NPM version :

npm -v


We have successfully installed Node js & NPM on Ubuntu 18.04/20.04/22.04. You are now ready to start deploying your applications and use Node js and NPM.

Recommended Node JS Tutorials

If you have any questions or thoughts to share, use the comment form below to reach us.


Greetings, I'm Devendra Dode, a full-stack developer, entrepreneur, and the proud owner of My passion lies in crafting informative tutorials and offering valuable tips to assist fellow developers on their coding journey. Within my content, I cover a spectrum of technologies, including PHP, Python, JavaScript, jQuery, Laravel, Livewire, CodeIgniter, Node.js, Express.js, Vue.js, Angular.js, React.js, MySQL, MongoDB, REST APIs, Windows, XAMPP, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL, and Bootstrap. Whether you're starting out or looking for advanced examples, I provide step-by-step guides and practical demonstrations to make your learning experience seamless. Let's explore the diverse realms of coding together.

One reply to Install Node Js and NPM Ubuntu 18.04/20.04/22.04 Command Line

  1. Well-written Article! Your article provides step-by-step information so that was easy to understand for beginners. so, thank you for this article and you have any tips and tricks about node.js then keep sharing.

Leave a Reply

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