KOSUNI KOREA
Korean News in English
Technology

How to Install Node.js: Step-by-Step Guide and Common Commands

Published October 15, 2026 · 2 views
How to Install Node.js: Step-by-Step Guide and Common Commands

Node.js 설치 방법, node.js 설치 명령어 정리

The simplest and safest way to install Node.js is through the official installer file. However, if you frequently switch development environments, using a version management tool on macOS and Linux can be much more convenient. Windows users often complete installation via an installer wizard, and once done, you can immediately verify it by checking node -v and npm -v.

This article compiles the most common Node.js installation methods along with frequently searched Node.js installation commands, verification steps, and whether npm is included—all in one place. It’s written with beginners in mind, using practical examples for easy following.

The Easiest Way to Install Node.js

When installing for the first time, simply choose the method that matches your operating system. Windows uses an installer file, macOS uses a .pkg file, and Linux often relies on package managers or version management tools.

The most straightforward sequence is: Download the LTS version from the official Node.js website → Complete installation → Verify the version in the terminal. LTS (Long-Term Support) versions are highly stable and commonly chosen for automation, server development, and learning purposes.

For example, on Windows, running the installer file with default options usually completes without issues. The installation typically includes npm, so there’s often no need to search for a separate npm installation.

Read More Related Articles

You can find more articles on similar topics in one place.

View Related Articles

When You Need Node.js Installation Commands

To be precise, Node.js installation commands vary by operating system. Therefore, when searching for installation commands, it’s better to look for commands specific to your OS to avoid mistakes.

If using Homebrew on macOS, the typical installation command is:

brew install node

On Ubuntu-based Linux systems, you often use package repositories or NodeSource. For example, using the default repository would look like this:

sudo apt update
sudo apt install nodejs npm

However, the version may not be the latest, so if your development project requires a specific version, it’s better to use a version management tool like nvm.

How to Verify Node.js Installation with npm Included

After installing Node.js, verification is essential. To quickly check whether installation was successful and whether npm was included, run these commands in the terminal or command prompt:

node -v
npm -v

If both display version numbers (e.g., v20.x.x), it’s working correctly. If you see a message like command not found, your PATH may not be set up properly.

In such cases, reinstalling or checking if the installation path is registered in environment variables can help. This issue is common on Windows, so it’s a good habit to verify versions right after installation.

Common Issues for Windows Users After Installation

On Windows, problems often arise after installation rather than during the installation process. For instance, commands may work in Command Prompt but not in PowerShell, or node commands might fail due to path issues.

To resolve this, first ensure you’ve opened a new terminal window after installation. Existing terminals don’t always reflect environment variable changes immediately. Next, use the where node command to verify the actual installation path.

For example, if Node.js is installed but npm is missing, it might indicate an incomplete installation or that another version of Node.js is being referenced. In such cases, removing and reinstalling Node.js can often be faster than troubleshooting.

Why Use nvm for Installation

If you work on multiple projects, Node.js versions may frequently change. Using nvm (Node Version Manager) makes it easy to switch between versions per project. It’s widely used in professional settings on Linux and macOS.

With nvm, you can assign different versions to different projects—e.g., version 18 for one project and version 20 for another—without needing to uninstall and reinstall each time. This is especially useful for automation tasks or learning environments.

The typical installation flow involves installing nvm first, then downloading the desired Node.js version. For example:

nvm install 20
nvm use 20

While it may feel unfamiliar at first, you’ll quickly appreciate its benefits once you start managing multiple projects.

Node.js 설치 방법, node.js 설치 명령어 정리

Common Installation Examples in Practice

The three most common installation scenarios are: Windows users typically use the official installer, macOS users often prefer Homebrew, and Linux users commonly combine apt or nvm with their setup.

For example, on macOS, you can install Node.js by typing this into the terminal:

brew install node

After installation, verify it using these commands:

node -v
npm -v

Following this simple sequence usually completes the setup. The key is to confirm versions after installation so you can start your project right away.

Essential Commands to Check After Installation

After installing Node.js, it’s enough to know just a few basic verification commands. There’s no need to memorize many at once.

  • node -v: Check Node.js version
  • npm -v: Check npm version
  • where node or which node: Check installation path

With these three commands, you can usually confirm whether the installation was successful. Later, you’ll use npm install for project setup, which requires Node.js and npm to be properly configured.

If you plan to create automation tools or run a simple server, running a quick test file like console.log('hello') right after installation is also recommended. This helps verify your environment quickly.

How to Confirm if Node.js Is Installed Correctly

The most common question online is “How do I know if Node.js is installed?” The answer is simple: if both node -v and npm -v display version numbers, it’s successfully installed.

If versions appear but npm doesn’t show up, the installation might be corrupted. In such cases, reinstalling or using a version management tool to reset is usually more efficient than troubleshooting.

In professional settings, many developers immediately run npm init -y to create a new project after installing Node.js. If this flows naturally from your setup, you’ve successfully completed installation and configuration.

Node.js Installation Verification and Maintenance Tips

Although Node.js might seem like a one-time installation tool, managing versions becomes important as projects grow. After installation, it’s helpful to note both the current version and the required project version to minimize future conflicts.

This is especially true for automation tasks where different projects may require specific Node.js versions. Node.js version discrepancies often cause runtime errors, so being aware of this can save time later.

The key steps are: Install using your OS-specific method → Verify node and npm → Use nvm for version management if needed. Following these three steps reduces the chance of getting stuck during initial setup.

FAQ

Q. Does installing Node.js include npm?
A. Yes, most official installation methods include npm by default. You can verify this immediately with npm -v.

Q. Is there only one Node.js installation command?
A. No. Commands vary depending on your OS and method. macOS often uses Homebrew, while Linux commonly uses apt or nvm.

Q. What should I do if the node command doesn’t work after installation?
A. Open a new terminal window to check again. If it still fails, verify environment variables or installation paths.

Note: Node.js versions and installation methods may change over time, so always double-check with the latest official documentation before applying changes.

Note: This article provides general installation instructions. Depending on your operating system, distribution, and Node.js version, specific steps may vary.
View More Articles in the Same Category

Continue exploring similar topics.

View Category Articles

FAQ

Does installing Node.js include npm?

Yes, most official installation methods include npm by default. You can verify this immediately with `npm -v`.

Is there only one Node.js installation command?

No. Commands vary depending on your OS and method. macOS often uses Homebrew, while Linux commonly uses apt or nvm.

What should I do if the node command doesn't work after installation?

Open a new terminal window to check again. If it still fails, verify environment variables or installation paths.

Korean Source

This article is an English localization of a Korean-language report from BlogScore. Original: Node.js 설치 방법, node.js 설치 명령어 정리