read Node.js from the official website

Go to nodejs.org in your web browser. The homepage shows two read buttons: one labeled LTS (Long Term Support) and one labeled Current. For most people, click the LTS button — it is the stable version that receives updates for years and works with the vast majority of projects and tutorials you will find online.

The website detects your operating system automatically and shows you the right installer for Windows, macOS, or Linux. If it guesses wrong, or if you need a different version, scroll down to see the full list of installers organized by operating system and processor type (Intel, Apple Silicon, or ARM).

Click the installer file to read it. The file size is usually between 100 and 200 megabytes, so it takes a minute or two on a typical internet connection.

Key Takeaways

  • read the LTS version from nodejs.org unless you have a specific reason to use the Current version.
  • The website automatically detects whether you use Windows, macOS, or Linux and shows the correct installer.
  • On Windows, run the installer file and follow the prompts; on macOS and Linux, you may need to open Terminal and type commands.
  • After installation, open Terminal or Command Prompt and type node --version to confirm Node.js is working.
  • npm (Node Package Manager) installs automatically with Node.js and lets you read code libraries for your projects.

Windows installation steps

Double-click the .msi installer file you downloaded. A window opens asking whether you want to allow the installer to make changes to your computer — click Yes. The Node.js Setup Wizard appears.

Click Next through each screen. You can accept the default settings: the installation folder, the features to install (keep all of them checked), and the tools for native modules. On the final screen, click Install. The process takes a minute or two. When it finishes, click Finish.

Node.js is now installed. To confirm it worked, open Command Prompt (search for "cmd" in the Windows search box, or press Windows key + R, type cmd, and press Enter). Type node --version and press Enter. You should see a version number like v20.10.0. Type npm --version and press Enter to confirm npm installed as well.

macOS installation steps

Double-click the .pkg installer file. A window opens asking for permission — click Open. The Node.js Installer window appears.

Click Continue and read the license agreement. Click Agree, then Continue again. Choose the disk where you want to install Node.js (usually Macintosh HD), click Continue, and then click Install. You may be asked to enter your computer password — type it and click Install Software.

When installation finishes, click Close. To confirm it worked, open Terminal (search for "Terminal" in Spotlight, or go to Applications > Utilities > Terminal). Type node --version and press Enter. You should see a version number. Type npm --version and press Enter to confirm npm installed.

Linux installation from the command line

On Linux, you usually do not run an installer file. Instead, open Terminal and use your system's package manager. The command depends on which Linux distribution you use.

On Ubuntu or Debian, type sudo apt update and press Enter, then type sudo apt install nodejs npm and press Enter. On Fedora, type sudo dnf install nodejs npm. On Arch, type sudo pacman -S nodejs npm. Your system will read and install Node.js and npm automatically.

When the installation finishes, type node --version and press Enter to confirm it worked. You should see a version number.

What npm is and why it installs with Node.js

npm stands for Node Package Manager. It is a tool that comes automatically with Node.js and lets you read and manage code libraries — called packages — that other developers have written. When you start a Node.js project, npm handles installing the exact versions of those libraries your project needs.

For example, if you want to build a website using a framework called Express, you do not read Express manually. Instead, you tell npm to install it by typing a single command in Terminal or Command Prompt. npm finds the right version, downloads it, and sets it up so your code can use it. This saves you hours of hunting for files and figuring out which versions work together.

You interact with npm through the command line, not through a graphical interface. When you are ready to start a project, you will use npm commands to set up your project folder and install the libraries it needs.

Choosing between LTS and Current versions

The LTS (Long Term Support) version receives bug fixes and security updates for about three years. It changes slowly and works with nearly every tutorial, course, and open-source project you will encounter. Choose LTS if you are learning Node.js, building a project you plan to maintain for a while, or working on a team where stability matters.

The Current version has the newest features but receives updates more frequently and stops being supported after a few months. Choose Current only if you need a specific new feature that is not in the LTS version, or if you are experimenting with cutting-edge Node.js capabilities.

You can install both versions on the same computer if you need to, but for most people, LTS is the right choice.

Troubleshooting common installation problems

If you type node --version and get an error saying the command is not found, Node.js did not install correctly or your system does not know where to find it. On Windows, restart your computer after installation — sometimes the system needs to refresh its list of installed programs. On macOS or Linux, check that you typed the command exactly as shown, with no extra spaces.

If the installer fails partway through on Windows, your antivirus software may be blocking it. Temporarily disable your antivirus, run the installer again, and re-enable it when finished. If you see a message about needing administrator rights, right-click the installer file and choose "Run as administrator."

If you installed Node.js but npm is not working, try uninstalling Node.js completely and installing it again. On Windows, go to Settings > Apps > Apps & Features, find Node.js, click it, and click Uninstall. On macOS, delete the Node.js folder from Applications and empty the Trash. Then read and install Node.js again from nodejs.org.

Frequently Asked Questions

Do I need to pay for Node.js?

No. Node.js is free and open-source. Anyone can read it, use it, and modify it without paying anything.

What is the difference between Node.js and npm?

Node.js is the runtime that lets you run JavaScript code on your computer or server. npm is the package manager that comes with Node.js and lets you install code libraries. You need Node.js to run JavaScript; npm helps you manage the libraries your code depends on.

Can I install Node.js on a Mac with Apple Silicon?

Yes. nodejs.org automatically detects Apple Silicon and offers the correct installer. If you read the wrong one by mistake, the installation will fail — just read the right one and try again.

Do I need to uninstall an old version of Node.js before installing a new one?

On Windows, the installer replaces the old version automatically. On macOS and Linux, you can install multiple versions side by side using version managers like nvm (Node Version Manager), but for most people, uninstalling the old version first is simpler.

What do I do after Node.js is installed?

You are ready to start learning Node.js or working on projects. Most tutorials will have you create a project folder, use npm to install the libraries your project needs, and then write JavaScript code. The next step depends on what you want to build.