How to Install Node.js on Ubuntu 24.04: Quick Guide

Ready to install Node.js on Ubuntu 24.04? Let’s see how!

How to Install Node.js on Ubuntu 24.04?

Node.js is an open-source run-time environment that allows you to execute JS outside the browser and is supported over various platforms, including Linux.

Let’s install it on Ubuntu 24.04.

Step 1: Update System Packages

Update the system via:

sudo apt update

Step 2: Install Node.js

To install Node.js using the default package manager, execute:

sudo apt install nodejs
installing nodejs on ubuntu 24.04

Step 3: Validate the installation

Just to double-check the installation of Node.js, execute this command:

node -v
checking node.js version on ubuntu 24.04

Note: If the output shows the version number, Node.js is installed successfully. Otherwise, your installation has failed.

Step 4: Install Node Package Manager (npm)

After that, install npm as it is required to manage the Node.js dependencies and packages:

sudo apt install npm
installing npm on ubuntu 24.04

Uninstalling Node.js from Ubuntu 24.04

For uninstalling Node.js from Ubuntu 24.04, execute this command:

sudo apt remove nodejs
uninstalling node.js from ubuntu 24.04

Leave a Comment

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

Scroll to Top