Vai al contenuto principale

Claude Code Installation Guide

Claude Code Installation Guide
Step-by-step installation guide for Claude Code on Mac, Windows, and Linux — npm, brew, and CLI setup, plus common install errors and how to fix them.

Install Claude Code with Anthropic’s native installer for macOS, Windows, or Linux, then confirm the CLI with claude --version and claude doctor.

Choose Homebrew, WinGet, npm, or a managed Linux package path only when your environment already depends on that tooling. Native install is usually cleaner because it reduces Node.js, PATH, and shell configuration issues.

Use the first run to verify access safely: open a trusted repository, check authentication, inspect what Claude Code can read, and make a small reversible change.

With Claude Code available on developer machines or CI runners, Verdent can assign planned coding tasks to isolated worktrees, track outputs, and require review and verification for each merge. This keeps agent sessions tied to normal engineering controls rather than one-off terminal experiments.

System Requirements & Prerequisites

Claude Code runs on macOS, Windows, and Linux. Confirm the operating system, shell, account access, and network path before installing.

RequirementMinimum
macOS13.0+
WindowsWindows 10 1809+
Ubuntu20.04+
Debian10+
RAM4 GB
Processorx64 or ARM64
NetworkInternet connection

Claude Code also needs a supported Claude account. The login flow opens a browser, so the machine must allow browser authentication callbacks.

Before installing, check these basics:

git --version

Git is not the installer, but it is normally required for repository work. You should install Claude Code in the same environment where your projects run. For example, install it in macOS Terminal for local Mac repositories, in PowerShell for Windows-native repositories, or inside WSL2 for Linux-based Windows development.

If your company uses a proxy, VPN, endpoint security tool, or restricted package registry, confirm that the installer URL, browser login, and CLI network requests are allowed. Most installation failures come from shell mismatch, blocked network access, or a PATH that was not refreshed after installation.

Install Claude Code on Mac (Homebrew & npm)

The recommended macOS install path is the native installer:

curl -fsSL https://claude.ai/install.sh | bash

After the installer finishes, open a new terminal window and verify the command:

claude --version
claude doctor

Use Homebrew if your team manages developer tools through Brewfiles, MDM policies, or repeatable workstation setup scripts:

brew install --cask claude-code

Use npm only when you need the older package-manager path for compatibility with an existing Node.js toolchain:

npm install -g @anthropic-ai/claude-code

Native installation is preferred on macOS because it avoids making Node.js a runtime dependency for Claude Code. If claude is not found after installation, restart the terminal and check whether the install directory was added to PATH.

For Apple silicon Macs, use the same commands. The processor requirement supports both x64 and ARM64, so no separate Apple silicon command is required.

Install Claude Code on Windows (npm + WSL)

On Windows, choose one installation environment first: native Windows or WSL2. Installing in both can create confusion because each environment has its own shell, filesystem paths, PATH settings, and authentication state.

For native Windows, run the PowerShell installer:

irm https://claude.ai/install.ps1 | iex

You can also install through WinGet when your workstation setup uses Windows package management:

winget install Anthropic.ClaudeCode

After installation, close and reopen PowerShell, then run:

claude --version
claude doctor

Use native Windows when your repository depends on PowerShell scripts, Windows paths, Visual Studio tooling, or Windows-specific build steps.

Use WSL2 when your project expects a Linux shell, Linux package managers, container-style workflows, or Unix-first build scripts. Inside the WSL terminal, run the Linux installer:

curl -fsSL https://claude.ai/install.sh | bash

Then verify inside WSL:

claude --version
claude doctor

PowerShell commands do not run unchanged in Bash, and Bash commands do not run unchanged in PowerShell. Confirm the prompt before pasting an installer command.

After choosing native Windows or WSL2, Claude Code Hooks can help you understand how project automation behaves in the environment you selected.

For source-level validation, Code is worth checking after you understand the Claude Code Installation Guide workflow described here.

Install on Linux & Ubuntu

On Linux and Ubuntu, run the native installer from the shell where you do development work:

curl -fsSL https://claude.ai/install.sh | bash

Open a new terminal session or reload your shell profile, then verify the CLI:

claude --version
claude doctor

Launch Claude Code from a repository when you are ready to test project access:

cd your-project
claude

Ubuntu 20.04+ and Debian 10+ meet the listed operating system requirements. For remote development servers, make sure the server has outbound network access and that browser-based authentication can complete from your environment.

On Alpine Linux, install the required runtime packages before use:

apk add libgcc libstdc++ ripgrep

Alpine uses musl libc, so follow the official musl instructions if your environment needs additional setup. ripgrep matters because Claude Code relies on fast project search during repository analysis.

After the Linux install is working, Claude Code can help you understand how the CLI fits into everyday repository workflows.

When details such as limits or setup steps matter, Youtube can help confirm the latest implementation surface.

Fixing Common Installation Errors

claude: command not found

Close and reopen the terminal first. If the command still fails, confirm that the installation directory is on PATH.

echo $PATH
which claude

On Windows PowerShell, use:

$env:Path
Get-Command claude

If the installer completed but the command is missing, the shell may not have loaded the updated profile yet.

Permission error with npm

Use the native installer when possible. Avoid sudo npm install -g because it can create root-owned global packages and future update problems.

If your team requires npm, fix the npm global package location instead of forcing the install with elevated permissions.

Windows shell error

PowerShell, CMD, Git Bash, and WSL use different command formats. The PowerShell installer starts with irm; the Linux and macOS installer uses curl. Run each command only in the matching shell.

Login loop

A login loop usually means the browser callback, proxy, VPN, region, or account session is blocking authentication. Try a clean browser session, confirm the correct Claude account, and check whether corporate network controls are intercepting the callback.

Search does not work

Run the diagnostic command:

claude doctor

Then verify that ripgrep is available when your platform requires a system copy:

rg --version

Search problems can limit Claude Code's ability to inspect a repository, find symbols, and understand project structure.

Verdent adds a delivery layer after installation. Claude Code can perform a coding task, while Verdent helps plan the work, split it across isolated worktrees, review the output, and verify changes before merge. Verdent reached 76.1% on SWE-bench Verified, a benchmark focused on completed software tasks rather than chat-only responses.

After the CLI is working, Claude Code MCP helps connect Claude Code to external tools and project context without changing the base installation.

Before you budget a real project around Claude Code Installation Guide, compare the claims here with Reddit.

Verify Your Claude Code Setup

Verify the installation before asking Claude Code to edit files.

claude --version
claude doctor

Then test Claude Code inside a real repository:

cd your-project
claude

Start with a read-only request, such as asking Claude Code to summarize the project structure, identify the test command, or explain the build system. This confirms that the CLI can read the working directory before you allow file edits, dependency installs, or generated changes.

A safe first-run sequence is:

  1. Confirm the CLI version.
  2. Run claude doctor.
  3. Open a repository.
  4. Ask for a read-only project summary.
  5. Ask for a plan before allowing edits.
  6. Review changes with Git before committing.

For team workflows, Verdent keeps that process structured. It can assign work to isolated branches or worktrees, coordinate multiple AI workers, and require review and verification before changes are merged.

Frequently Asked Questions

Is npm still required?

No. npm is no longer required for the recommended Claude Code installation path. Use the native installer unless your environment specifically depends on npm-based global tooling.

Does Claude Code run on Apple silicon?

Yes. Claude Code supports ARM64 processors, so Apple silicon Macs can use the same macOS installation commands.

Is WSL required on Windows?

No. WSL2 is optional. Use native Windows for Windows-based repositories and WSL2 for projects that expect a Linux shell, Linux package managers, or Unix-style build tooling.

How do I update Claude Code?

Native installs update through the native Claude Code update path. Package-manager installs should be updated with the matching package manager, such as Homebrew, WinGet, or npm.

How do I check the installation?

Run claude --version to confirm the CLI is available, then run claude doctor to check the local setup.

What the Claude Code installer Cannot Give You

The Claude Code installer gives you the local CLI. It does not plan multi-step engineering work, coordinate parallel agents, isolate each task in its own worktree, or verify every change before merge.

That coordination layer is where Verdent fits. Verdent helps teams turn individual Claude Code sessions into planned, parallel, reviewable software delivery.

Next Step

Turn Claude Code Installation Into Execution

Once Claude Code is installed and verified, use Verdent to coordinate the work around it: task ownership, parallel execution, and review. Start a managed workflow or connect your existing CLI agent.