How to Install Node.js on Kali Linux

Node.js is a powerful JavaScript runtime that allows developers to build scalable applications. If you’re using Kali Linux, you might need Node.js for running security tools, scripts, or web applications.

Step 1: Update Your System

First, update your package index to ensure you’re working with the latest repositories:

sudo apt update && sudo apt upgrade -y

Step 2: Install Node.js from Kali Repositories

Kali Linux comes with Node.js available in its repositories. To install it directly, run:

sudo apt install -y nodejs npm
  • nodejs → Installs Node.js runtime

  • npm → Installs Node Package Manager (used to manage JavaScript libraries)

Check the version:

node -v
npm -v

Step 3: Install Latest Node.js with NodeSource (Recommended)

The version in Kali’s repo may be outdated. To get the latest Node.js, use NodeSource:

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

Verify installation:

node -v
npm -v

Step 4: Install n (Optional, for Managing Versions)

If you want to switch between different Node.js versions, install n:

sudo npm install -g n

Upgrade to the latest stable Node.js:

sudo n stable

Or install the latest LTS version:

sudo n lts

Step 5: Test Node.js

Create a test file:

nano test.js

Add the following code:

console.log("Node.js is working on Kali Linux!");

Run it:

node test.js

You’ve successfully installed Node.js on Kali Linux. Now you can start building applications, running security tools, or developing scripts with ease. For security researchers, having Node.js is useful for running many open-source tools that rely on JavaScript. If you found this guide helpful, make sure to check out other tutorials on DROPVPS. We regularly publish step-by-step articles on Windows, Linux, servers, and development tools to help you get the most out of your system.

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