APIshop Documentation

Installing Node.js on Linux

Essential Runtime Environments for the Three Major AI Coding Tools

💡 Important note

Claude Code, CodeX, and Gemini CLI all require Node.js 18+ to run. If you already have Node.js 18 or later installed, you can skip this section. Verification command: node -v

Ubuntu/Debian distributions

curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs

# Verify installation
node --version
npm --version

CentOS/RHEL Distributions

curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash -
sudo yum install -y nodejs

# Verify installation
node --version
npm --version

Fedora Distribution

sudo dnf install -y nodejs npm

# Verify installation
node --version
npm --version

Arch Linux

sudo pacman -S nodejs npm

# Verify installation
node --version
npm --version

nvm allows you to manage multiple Node.js versions:

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

# Reload shell configuration
source ~/.bashrc

# Install Node.js LTS
nvm install --lts

# Set the default version
nvm use --lts
nvm alias default node

Frequently Asked Questions

Permission Issues

If you encounter permission issues, you can configure npm to use the user directory:

mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

Version too old

If the system-provided version of Node.js is too old, we recommend installing the latest LTS version using the NodeSource repository or nvm.

Next steps

✅ Environment setup is complete!

You can now continue installing Claude Code, CodeX, or Gemini CLI.