-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux Node.js Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to Node.js on Linux, covering Arch Linux, CachyOS, and other distributions including installation, npm, and JavaScript development.
Arch/CachyOS:
# Install Node.js
sudo pacman -S nodejs npm
# Or use nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bashDebian/Ubuntu:
sudo apt install nodejs npmFedora:
sudo dnf install nodejs npmCheck Node.js:
# Check version
node --version
npm --versionUsing npm:
# Install package
npm install package-name
# Install globally
npm install -g package-name
# Install from package.json
npm installConfigure npm:
# Set registry
npm config set registry https://registry.npmjs.org/
# List packages
npm list
# Update packages
npm updateInitialize project:
# Create project
npm init
# Or with defaults
npm init -yExecute scripts:
# Run script
npm run script-name
# Start application
npm start
# Run tests
npm testCheck installation:
# Check Node.js
which node
which npm
# Install if missing
sudo pacman -S nodejs npmFix permissions:
# Use nvm (recommended)
# Or configure npm prefix
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'This guide covered Node.js installation, npm usage, and development setup for Arch Linux, CachyOS, and other distributions.
- Development Environment - Development setup
- VS Code Guide - VS Code setup
- Node.js: https://nodejs.org/
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.