Get Node 22 LTS Running in Two Minutes
Installing Node
Install Node via the official installer or a version manager. Verify with `node --version`.
What you'll learn
- Install Node 22 LTS
- Use a version manager (recommended)
- Verify the install
You need Node installed before any of this works. Use a version manager — you’ll want to switch versions per-project eventually.
Option A — Version Manager (Recommended)
fnm (fast, modern, cross-platform)
# macOS / Linux
curl -fsSL https://fnm.vercel.app/install | bash
# then install Node 22
fnm install 22
fnm use 22
fnm default 22 nvm (older, very common)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
nvm install 22
nvm use 22 Both let you have multiple Node versions installed and switch with a single command — essential as you work across projects.
Option B — Direct Installer
Download from nodejs.org and run the installer. Pick the LTS version (currently 22.x). Fine for one-off learning; painful long-term.
Verify
node --version
# v22.x.x
npm --version
# 10.x.x If both print versions, you’re set.
Which Version?
- LTS (“Long Term Support”) — for production. Even-numbered majors (18, 20, 22).
- Current — newest features, shorter support window. Odd-numbered.
For learning: latest LTS (22 at time of writing).
Up Next
The Node REPL — try out JS without a file.
The REPL →