Node.js is a popular open-source JavaScript runtime built on Chrome's V8 JavaScript engine. It allows you to build scalable and high-performance server-side applications using JavaScript. This guide will walk you through the installation process of Node.js on Ubuntu 22.04.
- Begin by updating your apt repository to ensure you have the latest package information and dependencies. Open a terminal and run the following command:
- Install the curl utility if it's not already installed. curl is used to transfer data to or from a server using various protocols. Execute the following command in the terminal to install it:
- Now, you can proceed with the installation of Node.js. Run the following command in the terminal to download and execute the Node.js setup script: **(replace "version" with the version you want to install, e.g. 18)**
This command fetches the setup script from the NodeSource repository and pipes it to the bash shell with elevated privileges (sudo), allowing it to modify system files.