Install Node Js & NPM in Ubuntu 18.04, 20.04 and 22.04; In this tutorial, i am going to show you how to install Node Js & NPM on Ubuntu.
How to Install Node Js & NPM Ubuntu 20.04/22.04
- Step 1 – Update System Packages
- Step 2 – Add Node.js PPA
- Step 3 – Install Node.js and NPM On Ubuntu
- Step 4 – Test Version
Step 1 – Update System Packages
First of all, open terminal and execute the following command into it to 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 https://deb.nodesource.com/setup_11.x | sudo -E bash -
Step 3 – Install Node.js and NPM On Ubuntu
Once the ppa package is added, then execute the following command on terminal to install node js & npm on Ubuntu:
sudo apt-get install nodejs
For Install NPM on Ubuntu
sudo apt-get install npm
Step 4 – Test Version
Once the installation is done, execute the folllowing command on terminal to check the version:
nodejs -v
Check the Installed NPM version :
npm -v
Conclusion
In this tutorial, i have shown you how to install Node js & NPM on Ubuntu 18.04/20.04/22.04.