If you want to build a modern web application, you'll likely need NodeJS. In this article, I'll explain how to install NodeJS on Windows, MacOS, and Linux Ubuntu.
Updated July 2026: The screenshots, version numbers, and NodeSource command below document the original 2020 setup and should not be copied as current installation guidance. Node.js 12 is end-of-life. For a new installation, use an Active LTS or Maintenance LTS release and select the current instructions for your operating system on the official Node.js download page. A version manager is useful when you need to switch between Node.js versions for different projects.
Install NodeJS
For Windows and MacOS users, the installation is straightforward, like installing any other application: click, next, next...

You simply need to go to the NodeJS homepage and download it by clicking the large green button that says "LTS (Recommended for Most Users)". LTS stands for Long Time Support. The LTS version is more stable than the version labeled Current and gets the newest features and improvements with longer support compared to non-LTS versions.

Installation on Windows
Installing on Windows is straightforward, like installing any other application. The main thing you need is the NodeJS executable file that you can download from the homepage. Here are the steps required to install NodeJS on Windows:
- Download NodeJS LTS from the homepage
- Once downloaded, double-click the executable file
- Once installed, you can verify it via command prompt (cmd)
- After opening cmd, you can type the following command to check which version is installed on your device:
node --version
# -> v12.9.1
If you want to install NodeJS on WSL, you can follow the Ubuntu installation steps
Installation on MacOS
There are 2 ways to install on MacOS: the first is similar to Windows, and the second is using Homebrew. I recommend using Homebrew as it's easier. Here are the steps if you install using Homebrew:
- Install Homebrew if you don't have it yet. Type this script in your terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- Once installed, you can verify it by typing this script:
brew -v
# -> Homebrew 2.2.2
- After that, you can type the following command in your terminal:
brew install node
- If the installation is successful, you can verify it in the terminal like this:
node -v
# -> v12.9.1
npm -v
# -> 6.10.2
And you're ready to work with NodeJS on your Mac.
Installation on Ubuntu (2020 archive)
The following Ubuntu/WSL steps are retained as historical context. The hard-coded Node.js 12 repository is obsolete; use the current Linux instructions on the official download page instead.
- First, you need curl. If you don't have curl, you can type this command in your terminal:
sudo apt-get install curl
- Then add the NodeJS source with the following command:
# setup_12.x where 12 is the NodeJS version. If you want version 14
# You can change it to setup_14.x
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
- After adding the NodeJS source, type the following command to install NodeJS:
sudo apt-get update
sudo apt-get install nodejs
- After installation, you can verify it in the terminal using the following command:
node -v
# -> v12.9.1
npm -v
# -> 6.10.2
Summary
In this article, I've explained how to install NodeJS on Windows, Mac, and Ubuntu. If you want to install NodeJS, it's recommended to choose the LTS version. The LTS version is more stable than other versions and you get the newest features and improvements from NodeJS.


