Node.js Install Guide: A Step-by-Step Tutorial
Learn how to install Node.js on Windows, macOS, and Linux with practical steps, version guidance, npm setup, and verification tips from Install Manual.
To complete a node js install, start by choosing the right release (LTS for stability). Download the official installer from nodejs.org for your OS, or use a package manager (Homebrew for macOS, apt/yum for Linux, or Chocolatey for Windows). This quick answer highlights prerequisites, version choice, and verification steps for a successful setup.
What is Node.js and why you might want to install it
Node.js is a JavaScript runtime built on the V8 engine from Chrome, allowing you to run JavaScript on servers and in command-line tools. If you’re planning a node js install, you’ll unlock a consistent language across frontend and backend work, streamline tooling, and simplify deployment. According to Install Manual, Node.js underpins modern development by enabling server-side JavaScript for APIs, automation, and tooling. With the runtime installed, npm becomes your gateway to thousands of libraries, speeding up development and ensuring repeatable setups. For homeowners and DIY developers, the value is clear: you can prototype a local API, automate tasks, and run build processes with a familiar language. This article emphasizes practical, step-by-step guidance to get Node.js running on Windows, macOS, or Linux without confusion or guesswork.
Choosing the right release (LTS vs Current) and prerequisites
Choosing the right Node.js release is the first decision in a successful install. The LTS (Long-Term Support) line emphasizes stability and broad compatibility, making it ideal for production apps, while the Current release includes new features and may require more testing. For most homeowners and DIY developers tackling small projects, the best starting point is LTS. Prerequisites are simple: a supported operating system, admin or sudo access for system-wide installs, and a reliable internet connection. The Install Manual team recommends installing Node.js with admin rights when possible to ensure PATH updates are applied correctly. On Linux, you can also install via the distribution’s package manager, which can simplify updates. Regardless of method, download from the official source to avoid tampered installers. After installation, you’ll typically gain access to node and npm for starting your projects.
Installation methods by OS
Node.js can be installed in several ways, depending on your operating system and preferences. This section covers Windows, macOS, and Linux with concrete steps you can follow. In short, Windows users usually download a real installer from nodejs.org, macOS users can use the installer or Homebrew, and Linux users can use apt, yum, or an install script from NodeSource. For the node js install, always verify you’re fetching the official package and prefer LTS for stability. If you plan multiple Node versions, consider a version manager, which we cover later. By choosing the right method for your OS, you ensure a smooth setup and minimize post-install issues.
Windows
Download the Windows installer from nodejs.org, run it, and follow the prompts. Ensure you check the box to add Node to your PATH and accept the license. The installer will place node and npm in your system path, enabling commands from any terminal. After installation, open a new command prompt and run node -v and npm -v to confirm versions are reported. If PATH wasn’t updated automatically, you may need to restart your computer or manually edit environment variables.
macOS
macOS users can install via the official .pkg installer or use Homebrew with brew install node. The Homebrew path is convenient for ongoing updates. After installing, verify with node -v and npm -v. If npm is missing or outdated, run npm install -g npm to update globally. If you prefer a GUI installer, the official macOS package from nodejs.org is a straightforward option.
Linux
On Debian/Ubuntu, you can install Node.js from a package manager using apt install nodejs, or install the NodeSource repository for newer versions. RedHat/CentOS users can use yum/dnf similarly. Regardless of distro, verify with node -v and npm -v. Linux users who need flexibility for multiple projects may prefer a version manager like NVM to switch Node versions on the fly.
Verifying the installation and common issues
After installing, verify the runtime by running node -v to confirm the Node.js version and npm -v to confirm npm is installed. If commands aren’t found, ensure the installation path is in your system PATH and reopen the terminal. Common issues include missing PATH entries, permission errors during install, or stale shell environments. If you encounter problems, re-run the installer with administrative privileges or use a version manager to simplify version changes. The Install Manual team emphasizes re-checking environment variables and reloading the shell to apply changes.
Using Node Version Manager (NVM) for multi-version setups
For users who need to test across Node versions, NVM is a practical solution. On macOS/Linux, install NVM and then use nvm install --lts to grab the latest LTS version, or nvm install 16.x to pick a specific release. Windows users can use the nvm-windows project, which provides a compatible version manager with the familiar commands. Using a version manager avoids conflicts and keeps projects portable across environments.
Post-install: setting up npm, global packages, and environment paths
With Node.js installed, you’ll rely on npm to manage dependencies. Start by configuring npm's global directory if you regularly install global packages, to avoid permission issues. Consider running npm config set prefix "~/.npm-global" (or the equivalent on your OS) and updating your PATH. Install common global tools like npm install -g typescript or npm install -g eslint as needed for your projects. Regularly update npm to benefit from security patches and performance improvements. This phase also includes creating a standard project structure and adding a package.json file to manage dependencies efficiently.
Troubleshooting common pitfalls and best practices
To prevent trouble later, adopt best practices from the start: prefer the LTS release for stability, use a version manager for flexibility, and keep npm up to date. If you encounter permission errors, re-run installs with administrative rights or switch to a user-level installation with a version manager. Always verify checksums when provided and avoid downloading installers from unofficial sources. The guidance from Install Manual reinforces maintaining a clean, repeatable setup to support reliable development and testing environments.
Authority sources
For deeper details and official guidance, refer to trusted sources:
- https://nodejs.org/en/docs/
- https://developer.mozilla.org/en-US/docs/Learn/Server-side/Node_server_with_Express
- https://learn.microsoft.com/en-us/nodejs/get-started/install
Tools & Materials
- Computer or device with internet access(Stable connection for downloading installers and packages)
- Supported OS (Windows/macOS/Linux)(Ensure admin rights if installing system-wide)
- Node.js official installer or package manager(Choose the LTS version for general use)
- Terminal or command prompt(Windows: PowerShell or cmd; macOS/Linux: Terminal)
- Node Version Manager (optional)(Useful for managing multiple Node versions)
- Text editor (optional)(Helpful for writing and testing quick scripts)
- Administrative rights(Needed to modify PATH and install system-wide)
- Build tools (Linux only, optional)(Needed for compiling native addons from npm packages)
Steps
Estimated time: 15-30 minutes
- 1
Determine the desired Node.js version
Decide between LTS for stability or Current for latest features. LTS is recommended for most projects, especially for home and DIY setups that need reliability.
Tip: LTS minimizes breaking changes in updates and is ideal for long-term projects. - 2
Open the official download source
Navigate to nodejs.org and locate the download page for your operating system. Confirm that you’re getting the official installer to avoid security risks.
Tip: Bookmark nodejs.org for quick access during future updates. - 3
Run the installer
Execute the downloaded file and follow the prompts. On Windows, ensure the option to add Node to PATH is checked.
Tip: Choose a simple installation path to reduce PATH issues later. - 4
Complete installation prompts
Finish the setup wizard and allow it to install both node and npm. You may be prompted for admin rights on some systems.
Tip: If you’re on Linux, consider using sudo for system-wide installs. - 5
Verify Node.js is installed
Open a new terminal and run node -v to confirm the version. Run npm -v to ensure npm is installed with Node.js.
Tip: If commands aren’t found, restart the terminal or check PATH settings. - 6
Update npm if necessary
If npm is out of date, update it with npm install -g npm to ensure you have the latest package manager features.
Tip: Updating npm helps avoid compatibility issues with newer packages. - 7
Set up a basic project
Create a project folder and run npm init -y to generate a package.json file. This forms the foundation for dependencies.
Tip: Keep a tidy workspace by listing dependencies in your package.json. - 8
Consider a version manager
If you expect multiple projects needing different Node versions, install a version manager like NVM.
Tip: NVM simplifies switching between Node versions during testing and development. - 9
Document and test
Record the installed versions and run a quick hello world script to validate the environment.
Tip: A short script helps catch issues early in the setup.
Got Questions?
Do I need to install npm separately?
No. npm is included with Node.js. After installation, verify with npm -v and start using npm to manage dependencies.
npm comes bundled with Node.js. Check its version with npm -v.
Which Node.js version should I install?
For most users, the LTS release offers the best balance of stability and features. Current includes newer features but may require more testing.
LTS is safer for most projects.
Can I install Node.js without admin rights?
On Windows, admin rights are typically required for system-wide installs. On macOS/Linux, you can often use a version manager or user-level install.
Admin rights are usually needed on Windows; a version manager can help elsewhere.
How do I verify Node.js is installed?
Run node -v to confirm the Node.js version and npm -v to confirm npm is installed. If these commands fail, re-check PATH and restart the terminal.
Check versions with node -v and npm -v.
Should I use a version manager like NVM?
Yes. NVM makes it easy to install and switch between multiple Node.js versions for testing and development.
NVM helps manage multiple Node versions.
What if the node command isn’t recognized after install?
Ensure PATH is updated and the terminal is restarted. If problems persist, try reinstalling or using a version manager.
Update PATH and reopen the terminal.
Watch Video
Main Points
- Choose the LTS release for stability and compatibility.
- Verify installations with node -v and npm -v.
- Use a version manager for multi-version workflows.
- Keep npm up to date for security and performance.

