Skip to content

Instantly share code, notes, and snippets.

@jurnalanas
Created March 27, 2024 16:07
Show Gist options
  • Save jurnalanas/a4222cd922ea63bbfa7a3bef2b83bb6c to your computer and use it in GitHub Desktop.
Save jurnalanas/a4222cd922ea63bbfa7a3bef2b83bb6c to your computer and use it in GitHub Desktop.
Installing Node.js using NVM (macOS/Linux)

Here's a simple tutorial on installing Node.js using NVM (Node Version Manager) and getting the LTS (Long-Term Support) version:

Prerequisites

  • macOS or Linux-based system
  • Text editor
  • Terminal/Command Line

Steps

  1. Install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
  1. Verify NVM Installation:
nvm --version
  1. Install the LTS version of Node.js:
nvm install --lts
  1. Make the LTS version the default:
nvm use --lts
  1. Verify Node.js installation:
node -v
npm -v

For Windows Users

Additional Notes:

  • List available Node.js versions: nvm ls-remote
  • Switch between versions: nvm use
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment