openclaw: command not found
bash: openclaw: command not found / zsh: command not found: openclaw
OpenClaw troubleshooting · Updated 2026
Error Message
bash: openclaw: command not found / zsh: command not found: openclaw
What Causes This
The openclaw binary isn't in your PATH. This usually happens after installing via npm when the global bin directory isn't in your shell's PATH, or when using nvm and opening a new terminal.
How to Fix It
Add the npm global bin to your PATH:
# Find where npm installs global binaries
npm config get prefix
# Usually: /usr/local (macOS) or ~/.npm-global (Linux)
# Add to PATH
echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# Or for bash:
echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Verify
which openclaw
openclaw --version
On WSL2/Linux, if you installed with sudo npm install -g, the binary may be at /usr/bin/openclaw or /usr/lib/node_modules/.bin/openclaw. On macOS with Homebrew Node, check /opt/homebrew/bin/.