Skip to content

Node.js & Git Environment Setup

Installation

Windows

Node.js: Download the LTS .msi installer from the Node.js website, run it, and follow the default wizard.

Git: Download the installer from the Git website.

Run it and follow the default wizard.

Mac

Homebrew is recommended. If Homebrew is not installed yet, run:

bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then install both Node and Git with one command:

bash
brew install node git

You can also download the .pkg installer from the Node.js website. macOS usually ships with Git; the first time you run git --version, if it prompts to install the "command line developer tools", click install.

Linux

Node.js via nvm is recommended (easy version switching; some distros ship an outdated Node):

bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.bashrc
nvm install --lts

Git via your distro's package manager:

bash
# Ubuntu / Debian
sudo apt install -y git

# CentOS / RHEL / Fedora
sudo dnf install -y git

# Arch Linux
sudo pacman -S git

Verify

On all systems, run in the terminal:

bash
node -v
npm -v
git --version

If all three print version numbers, you're good to go.