Installation via npm is deprecated. Use one of the recommended methods below for the best experience.
Prerequisites
- Node.js 18 or higher: Required for running Claude Code
- Git: Required for repository operations and version control features
- Terminal: Command line access (bash, zsh, PowerShell, etc.)
Installation Methods
macOS / Linux (Recommended)
The recommended installation method uses our installation script:Homebrew (macOS / Linux)
If you prefer package managers:Windows (Recommended)
For Windows, use our PowerShell installation script:WinGet (Windows)
Alternatively, use the Windows Package Manager:NPM (Deprecated)
If you still need to use npm:Verification
After installation, verify Claude Code is installed correctly:First Run
Navigate to your project directory and run:- Prompt you to authenticate with your Anthropic account
- Initialize your project configuration
- Start an interactive session
Authentication
Claude Code supports multiple authentication methods:Platform-Specific Notes
macOS
Permissions: You may need to grant terminal permissions in System Preferences > Security & Privacy. Gatekeeper: On first run, macOS may block the executable. Go to System Preferences > Security & Privacy and click “Allow Anyway.”Linux
glibc Compatibility: Claude Code requires glibc 2.30 or later. For older systems (e.g., RHEL 8), use the npm installation method. Permissions: Ensure the installation directory is in your PATH:~/.bashrc or ~/.zshrc for persistence.
Windows
PowerShell Execution Policy: You may need to allow script execution:Installation Locations
Claude Code installs to the following default locations:| Platform | Installation Path |
|---|---|
| macOS (script) | ~/.claude/bin/claude |
| macOS (Homebrew) | /usr/local/bin/claude |
| Linux | ~/.claude/bin/claude |
| Windows | %LOCALAPPDATA%\Programs\ClaudeCode |
Configuration Files
After installation, Claude Code creates configuration files:Update Management
Claude Code automatically checks for updates and can update itself:Update channels can be configured in settings. The
stable channel receives tested releases, while latest gets new features faster.Shell Completion
Enable shell completion for better CLI experience:Troubleshooting
Installation Fails
Issue: Installation script fails or hangs Solutions:- Check internet connection
- Verify Node.js 18+ is installed:
node --version - Try alternative installation method (Homebrew, WinGet)
- Check firewall/proxy settings
Command Not Found
Issue:claude: command not found after installation
Solutions:
- Restart your terminal
- Check PATH includes Claude installation directory
- For manual installations, add to PATH:
Authentication Issues
Issue: OAuth redirect doesn’t work Solutions:- Press
cto copy URL manually - Check browser settings allow opening localhost URLs
- Use API key authentication instead:
Performance Issues
Issue: Claude Code is slow to start Solutions:- Use simple mode for faster startup:
- Check MCP server connections (may slow startup)
- Review plugin configurations
System-Specific Issues
Uninstallation
To remove Claude Code:Next Steps
Quickstart
Get started with your first commands
Configuration
Customize settings and permissions
CLI Reference
Learn all available CLI commands
Core Concepts
Understand how Claude Code works