Skip to content

Installing Node.js

Scope: getting Node and npm on your machine, picking a version strategy, and proving it works.

The short version

Use a version manager (fnm or nvm) rather than the OS package or the big installer button. Node versions move fast; a manager lets you switch in one command.

fnm is fast and simple:

Windows (PowerShell):

winget install Schniz.fnm

Mac / Linux:

curl -fsSL https://fnm.vercel.app/install | bash

Then install the current LTS (Long-Term Support) release:

fnm install --lts

Option B: nvm

nvm is the older, widely documented choice (Mac/Linux; Windows uses nvm-windows):

nvm install --lts
nvm use --lts

Option C: the installer

nodejs.org offers installers for every OS. Fine for trying things out; you'll outgrow it the day you need two Node versions.

Check it worked

node --version
npm --version

You should see something like v24.x.x and 11.x.x. Node ships with npm (the package manager) — one install, both tools.

LTS vs Current: which version?

  • LTS (even numbers: 20, 22, 24) — supported for years, the safe default. Use this.
  • Current (odd numbers) — newest features, short support window. Only if you need something specific.

When a new LTS lands (every October), fnm install --lts grabs it and your old version stays put until you remove it.

Keeping it updated

fnm install --lts   # or: nvm install --lts

Re-run when you hear about a new LTS. Patch updates within an LTS are boring on purpose — install them.

Check

  • [ ] node --version and npm --version both print versions
  • [ ] You can say why a version manager beats the plain installer
  • [ ] You know what LTS means and why it's the default choice

Next: Your First Program.