Today we are going to learn How to Install Node.js and NPM in Ubuntu 22.04 Example. This tutorial will cover on how you can install node.js and npm in ubuntu 20.04 with example.
Steps on How to Install Node.js and NPM in Ubuntu 22.04 Example:
- Step 1: Install Node js & NPM on Ubuntu
- Step 2: Add Node.js PPA
- Step 3: Now Install Node.js and NPM on Ubuntu
- Step 4: Test Version
- Step 5: Conclusion
Also Read: How to Install and Configure phpMyAdmin in Ubuntu 22.04
Step 1: Install Node js & NPM on Ubuntu
Firstly, To get this version, you can use the apt package manager. Refresh your local package index first by typing.
sudo apt update
Step 2: Add Node.js PPA
In this step, we will install the PPA in order to get access to its packages. From your home directory, use curl to retrieve the installation script for your preferred version, making sure to replace 16.x with your preferred version string.
cd ~ curl -sL https://deb.nodesource.com/setup_16.x -o /tmp/nodesource_setup.sh
Also Read: How to Install and Run PHP 8.x on Ubuntu 20.04
Step 3: Now Install Node.js and NPM on Ubuntu
Type in the following code to begin the installation for Node.js
sudo apt install nodejs
Following code to begin the installation for NPM.
sudo apt install npm
Also Read: Laravel 9 User Roles and Permissions Tutorial Example
Step 4: Test Version
Run the following command to verify the Node installation.
Verify the NPM installation.
Step 5: Conclusion
Today, We had learn How to Install Node.js and NPM in Ubuntu 22.04 Example. Hope this tutorial helped you with learning Ubuntu. If you have any question you can ask us at comment section below. If you like the tutorial please subscribe our YouTube Channel and follow us on social network Facebook and Instagram.
Also Read: How to Setup Nginx with Let’s Encrypt on Ubuntu 22.04
One thought on “How to Install Node.js and NPM in Ubuntu 22.04 Example”