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
Step 3: Validate the installation
Just to double-check the installation of Node.js, execute this command:
node -v
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
Uninstalling Node.js from Ubuntu 24.04
For uninstalling Node.js from Ubuntu 24.04, execute this command:
sudo apt remove nodejs
I’m a professional technical content writer who has 4+ years of experience with different operating systems, programming languages, GUI-based apps, IT, and technology in general.