how to install node js on ubuntu 25.04

Node.js is a powerful runtime for building modern web applications, APIs, and scalable server-side services. If you are using Ubuntu 25.04, installing Node.js correctly ensures you can run JavaScript applications efficiently.

Step 1: Update Your System

It is always best to start by updating your system. This prevents package conflicts and ensures that you install Node.js in a stable and up-to-date environment:

sudo apt update
sudo apt upgrade -y

Step 2: Add the NodeSource Repository

The default Ubuntu repositories may not provide the latest Node.js version. To get the current stable release, use the official NodeSource repository:

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs

This installs both Node.js and npm at once.

Step 3: Verify Node.js and npm

After installation, check that Node.js and npm are working properly by confirming their versions:

node -v
npm -v

If you see version numbers, the installation was successful.

Step 4: Install Build Tools (Optional)

Some npm packages need to be compiled from source. To avoid errors during installation of such packages, it’s recommended to install essential build tools:

sudo apt install -y build-essential

Now Node.js and npm are fully installed on Ubuntu 25.04, ready for building and deploying modern JavaScript applications.

Share:

More Posts

How to Install Maven on macOS 2025

What you will read?1 Check for Java Installation2 Install Homebrew (If Not Installed)3 Install Maven via Homebrew4 Verify Environment Variables (Optional)5 Create a Sample Maven

How to Use Google SMTP Server

What you will read?1 Step 1: Enable SMTP Access in Gmail2 Step 2: Secure Connection with TLS3 Step 3: Send an Email via SMTP4 Step

how to install wine on RHEL

What you will read?1 Check RHEL version and CPU architecture2 Update system and install base tools3 Verify subscription and enable CodeReady Builder4 Enable EPEL repository5

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments