Introduction
Node.js is an open-source, cross-platform, back-end JavaScript runtime environment that allows developers to use JavaScript to build server-side applications. Node.js uses an event-driven, non-blocking I/O model, which makes it lightweight and efficient, perfect for building scalable, high-performance applications.
Prerequisites
- Basic knowledge of Linux commands.
- Up and running Ubuntu 22.04 Machine
- Root permission
In this post, We will show you how to install NodeJs and NPM on ubuntu 22.04 LTS machine
Step 1: Run System Updates
We need to update the current ubuntu repository by following command.
sud apt-get update
Step 2: Install NodeJS
By default nodeJs repository avalable in default ubuntu repo of ubuntu 22.04 LTS, We cabn direct use the given command to install NodeJS package.
sudo apt install nodejs -y

Step 3: Verify NodeJS version
Once the installation process got completed so then we need to execute the gievn command to validate the NodeJS version.
node -v

Step 4: Install Node Packge Manager
NPM stands for “Node Package Manager” and it is the default package manager for Node.js. It is a command-line tool that allows developers to install, share, and manage packages of code written in JavaScript. NPM provides access to over 1.4 million packages of reusable code, which can be installed and used in Node.js projects.
To install npm.
sudo apt install npm -y

To verify npm version.
npm -v

Conclusion
We have successfully installed NodeJS and npm on ubuntu 22.04 LTS, If you still have questions, please post them in the comments section below.
Useful information
Awesome
excellent