Files
puter/install.md
stuffbymax 7c9bbd4336 Add shell reload instructions for nvm setup (#2446)
Added instructions to reload the shell after loading nvm. 
i forgot to add it because i am stupid
2026-02-08 19:31:46 -08:00

2.2 KiB

INSTALL.md

Node.js & npm Installation Guide

1. Arch Linux / Manjaro

# Update package database
sudo pacman -Syu

# Install Node.js and npm
sudo pacman -S nodejs npm

# Verify installation
node -v
npm -v

2. Debian / Ubuntu

# Update package database and install curl
sudo apt update
sudo apt install -y curl

# Install nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash

# Load nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

# Reload shell
source ~/.bashrc     # Or source ~/.zshrc if using Zsh

# Install latest Node.js and npm
nvm install node

# Verify installation
node -v
npm -v

3. CentOS / RHEL

# Install curl if missing
sudo yum install -y curl

# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash


# Load nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

# Reload shell
source ~/.bashrc     # Or source ~/.zshrc if using Zsh

# Install latest Node.js and npm
nvm install node

# Verify installation
node -v
npm -v

4. Fedora

# Update system
sudo dnf update -y

# Install Node.js and npm from modules
sudo dnf module list nodejs       # Check available versions
sudo dnf module enable nodejs:18  # Example: enable Node 18 LTS
sudo dnf install -y nodejs npm

# Verify installation
node -v
npm -v

5. openSUSE

# Refresh repositories
sudo zypper refresh

# Install Node.js and npm
sudo zypper install -y nodejs npm

# Verify installation
node -v
npm -v

nvm allows installing multiple Node.js versions and switching between them easily:

# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash

# Load nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

# Reload shell
source ~/.bashrc     # Or source ~/.zshrc if using Zsh

# Install latest Node.js and npm
nvm install node

# Or install latest LTS version
nvm install --lts

# Switch Node versions
nvm use node

# Verify installation
node -v
npm -v