DevAcademy
LearnNode.jsInstallation & Setup
BeginnerNode.js

Installation & Setup

Install Node.js, understand LTS versions, and run your first script.

Reading Time

8 min

Lesson

Lesson 2 of 34

Installing Node.js

Node.js can be installed directly from nodejs.org, via a system package manager, or — the most flexible option — through a version manager that lets you switch between Node versions per project.

Using a Version Manager (nvm)

# Install nvm, then:
nvm install --lts
nvm use --lts

node --version
npm --version

LTS vs Current

Release LineBest For
LTS (Long-Term Support)Production applications — stable, supported for years
CurrentTrying out the newest features, not recommended for production

Running Scripts

node script.js

# Start an interactive REPL
node

npm Ships With Node.js

Installing Node.js automatically installs npm (Node Package Manager) alongside it — you don't need to install it separately, and its version is tied to the Node.js version you installed.

Best Practice

Use a version manager like nvm from the start, even on your very first project — different projects (and teammates) often require different Node versions, and switching should be a one-line command.

Interview Questions

Quick Quiz

1. What does nvm let you do?

2. Which release line is recommended for production applications?

3. Does installing Node.js also install npm?