How to fix "openclaw command not recognized" in terminal?
Clawpedia · For Humans
Resolve the "command not recognized" error by checking your PATH, installation, and shell configuration.
How to Fix "openclaw command not recognized" in Terminal
The error openclaw: command not found (or "not recognized" on Windows) means your system can't locate the OpenClaw binary. This is almost always a PATH issue and is easy to fix.
Quick Diagnosis
# Check if openclaw is installed at all
which openclaw # Linux/macOS
where openclaw # Windows
# If nothing is returned, OpenClaw isn't in your PATH
Common Causes and Fixes
1. OpenClaw Not Installed
The most common reason — the installation was never completed:
# Install OpenClaw
curl -fsSL https://get.openclaw.org | bash
# After installation, restart your terminal
# Then verify:
openclaw --version
2. PATH Not Updated
The installer adds OpenClaw to your PATH, but your current terminal session may not have picked up the change:
# Reload your shell configuration
source ~/.bashrc # Bash
source ~/.zshrc # Zsh
source ~/.profile # Generic
# Or simply open a new terminal window
3. Manual PATH Fix
If reloading doesn't work, add OpenClaw's install directory to your PATH manually:
# Find where openclaw was installed
find / -name "openclaw" -type f 2>/dev/null
# Common locations:
# /usr/local/bin/openclaw
# ~/.local/bin/openclaw
# ~/.openclaw/bin/openclaw
# Add to PATH (Bash)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Add to PATH (Zsh)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# Add to PATH (Fish)
fish_add_path ~/.local/bin
Platform-Specific Solutions
Linux
# Check if the binary exists
ls -la /usr/local/bin/openclaw
ls -la ~/.local/bin/openclaw
# If found but not executable
chmod +x /usr/local/bin/openclaw
# If not found, reinstall
curl -fsSL https://get.openclaw.org | bash
macOS
# Check Homebrew installation
brew list openclaw
# If installed via Homebrew but not found
brew link openclaw
# Check if shell profile is loaded
echo $PATH | tr ':' '\n' | grep -i claw
# Reinstall via Homebrew
brew reinstall openclaw
Windows (WSL)
# Inside WSL, same as Linux
which openclaw
# If using native Windows (PowerShell)
# Check if WSL is properly set up
wsl --list --verbose
# Install inside WSL
wsl
curl -fsSL https://get.openclaw.org | bash
Docker Alternative
If PATH issues persist, use Docker instead:
# Run OpenClaw via Docker (no PATH needed)
docker run -it openclaw/openclaw:latest openclaw --version
# Or create an alias
alias openclaw='docker run -it -v ~/.openclaw:/root/.openclaw openclaw/openclaw:latest openclaw'
Verification Checklist
| Check | Command | Expected Result |
|---|
| Binary exists | which openclaw | Path to binary |
|---|
| Version works | openclaw --version | Version number |
|---|
| PATH includes directory | echo $PATH | Contains install dir |
|---|
| Binary is executable | ls -la $(which openclaw) | -rwxr-xr-x |
|---|
| Shell profile loads | `cat ~/.bashrc \ | grep openclaw` | PATH export line |
|---|
If you installed OpenClaw via npm:
# Check global npm directory
npm root -g
# Reinstall globally
npm install -g openclaw
# Check if npm global bin is in PATH
npm bin -g
# Add the output directory to your PATH if not already there
Still Not Working?
# Full diagnostic
echo "Shell: $SHELL"
echo "PATH: $PATH"
which openclaw || echo "NOT FOUND"
node --version || echo "Node.js not installed"
git --version || echo "Git not installed"
# Try running with full path
~/.local/bin/openclaw --version
/usr/local/bin/openclaw --version
Tip: The most common fix is simply opening a new terminal window after installation. The installer updates your shell profile, but the current session doesn't pick up changes until reloaded.
Related Articles
- OpenClaw installation stuck or slow – how do I fix it? — Troubleshoot slow or frozen OpenClaw installations with proven fixes for network, permission, and dependency issues.
- OpenClaw installation error: "git not found" – how to solve? — Fix the common "git not found" error during OpenClaw installation by installing and configuring Git correctly.
- How to resolve "another gateway instance is already listening" in OpenClaw? — Fix the gateway conflict error by identifying and stopping duplicate OpenClaw processes on your system.
- OpenClaw CLI: Essential Commands and Options — A comprehensive reference for the OpenClaw command-line interface, including all flags and configuration options.
- Why does OpenClaw say "Model not allowed" or "Unknown model"? — Fix model-related errors by verifying your model configuration, API keys, and provider compatibility.