solution install high macos linux windows

openclaw: command not found

Fix PATH issues that cause the OpenClaw CLI to be missing after install (wrong shell, npm prefix not on PATH, multiple Node installs).

By CoClaw Team •

Symptoms

  • You installed OpenClaw, but your shell says openclaw: command not found.

Cause

Almost always a Node/npm PATH problem:

  • npm global bin directory is not on PATH
  • you’re in a different shell than you configured (zsh vs bash)
  • multiple Node installs exist and the service/terminal is using a different PATH

Fix

1) Confirm where npm installs global binaries

npm prefix -g

Your global bin directory is typically <prefix>/bin. Ensure it’s on PATH.

2) Add it to your shell

Example:

export PATH="/path/from/npm/prefix/bin:$PATH"

Persist in:

  • zsh: ~/.zshrc
  • bash: ~/.bashrc

Then open a new terminal.

3) Recheck

command -v openclaw
openclaw --help

Verify

openclaw --help prints usage, and openclaw status runs (even if gateway isn’t configured yet).

Verification & references

  • Reviewed by:CoClaw Code Team
  • Last reviewed:March 14, 2026
  • Verified on: macOS · Linux · Windows
Want to explore more? Browse all solutions or ask in the Community Forum .
Report a problem

Related Resources

Windows: 'openclaw' is not recognized after install
Fix
Fix Windows PATH issues after installing OpenClaw globally (npm prefix not on PATH, terminal not restarted, or multiple Node installs).
Control UI: dashboard root returns plain-text 'Not Found' after upgrade (pnpm global install)
Fix
Fix cases where the gateway starts normally after an upgrade, but `/` returns plain-text `Not Found` until Control UI assets are copied out of the pnpm global package tree and `gateway.controlUi.root` points at that local copy.
Windows native: node run hangs after printing PATH, or the runtime stays unstable
Fix
Stabilize native Windows setups where `openclaw node run` hangs after PATH output, the runtime behaves differently from your shell, or your real requirement is better served by WSL2.
npm install -g fails with EACCES / permission denied
Fix
Fix global install permission errors on Linux/macOS by switching npm's global prefix to a user-writable directory (avoid sudo).
OpenClaw Installation Troubleshooting: Node/NPM, PATH, Windows (WSL2), and Docker
Guide
A layered checklist for the most common 'can't install' / 'command not found' / 'service won't start' failures. Covers Node version, global install permissions, PATH issues, WSL2 systemd, and Docker setup gotchas.
OpenClaw on Native Windows: PATH, Scheduled Tasks, Node Host, and the Real Failure Modes
Guide
A field guide to running OpenClaw on native Windows without guesswork: separate shell, Scheduled Task, and node-host environments; fix PATH-driven failures cleanly; and know when WSL2 is the faster exit.