How to Install Claude Code on Windows, macOS & Linux (2026): Complete Setup Guide

How to Install Claude Code on Windows, macOS & Linux (2026): Complete Setup Guide

Quick Answer

Claude Code brings an AI coding assistant directly into your development workflow. You can use it to explore a project, explain unfamiliar code, fix bugs, write tests, and make changes through your terminal or supported development interfaces.

But getting started can be confusing when different tutorials recommend npm, Git Bash, WSL, PowerShell, Homebrew, or separate authentication methods.

The good news is that Claude Code can now be installed natively on Windows, macOS, and Linux without installing Node.js first.

This step-by-step guide covers the official installation commands, system requirements, Windows native versus WSL setup, account login, your first coding session, and solutions for common installation errors.

How Do You Install Claude Code on Windows, macOS, or Linux?

To install Claude Code, open a terminal and run the official installer for your operating system: PowerShell on Windows, or the shell installer on macOS and Linux. Then reopen your terminal, run claude --version to verify installation, and enter claude in your project directory to sign in and start coding.

Table Of Content

Claude Code Installation Commands: Quick Reference

If you already know which operating system and terminal you are using, start with the correct installation command below.

These commands are based on Anthropic's official Claude Code setup documentation, verified for October 2026.

Operating system / method

Official installation command

Recommended for

macOS

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

Native installation

Linux

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

Native installation

Windows PowerShell

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

Native Windows installation

Windows CMD

curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

Native Windows installation

Windows WSL

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

Installation inside a Linux distribution

macOS with Homebrew

brew install --cask claude-code

Homebrew-managed installation

Windows with WinGet

winget install Anthropic.ClaudeCode

WinGet-managed installation

Run only the command that matches your terminal. PowerShell, Windows CMD, and Linux Bash use different syntax.

After installation, open a new terminal and run:

Then navigate to your project folder and launch:

A working installation displays a Claude Code version number. Starting an interactive session for the first time normally opens the account authentication flow.

The following sections explain each method, prerequisites, authentication, and troubleshooting in more detail.

What Is Claude Code, and Where Can You Use It?

Claude Code is Anthropic's AI coding assistant for software development.

It can work with files in a development project, investigate code, suggest changes, help with debugging, execute supported tools, and assist with testing and documentation.

Unlike a browser-based chatbot where you repeatedly copy code between windows, the Claude Code command-line interface can operate in the context of a local project.

It is available through multiple interfaces.

Interface

How you use it

Best for

Claude Code CLI

Run claude in a terminal

Terminal workflows, repository exploration, automation

Claude Code in VS Code

Use the editor integration

Developers who prefer a visual code editor

Claude Code Desktop

Use the graphical application

Working with coding sessions without relying on the terminal interface

Claude Code on the Web

Start supported cloud coding sessions

Working through a browser-based workflow

CI/CD integrations

Connect automation to development pipelines

Repeatable engineering tasks

This guide covers installing the Claude Code CLI.

The desktop application and editor integrations have different installation and setup workflows. You do not need to install every interface to begin using Claude Code.

Claude Code System Requirements in 2026

Before installing anything, check whether your computer meets the official requirements.

Supported operating systems and hardware

Requirement

Official requirement or guidance

macOS

Version 13.0 or later

Windows

Windows 10 version 1809 or later, or Windows Server 2019+

Ubuntu

Version 20.04 or later

Debian

Version 10 or later

Alpine Linux

Version 3.19 or later, with additional dependencies

Processor

Supported x64 or ARM64 architecture

Memory

At least 4 GB RAM

Network

Internet connection

Shell

Bash, Zsh, PowerShell, or CMD

Account

Eligible Claude subscription, Console account, or supported provider

These are minimum requirements, not a guarantee that every large codebase will perform well on a low-memory device.

A development environment with more memory may be preferable for large repositories, intensive builds, and multiple running services.

Do you need Node.js to install Claude Code?

No—not for the recommended native installer.

Older tutorials often instruct users to install Node.js first and run:

That remains a supported alternative, but it is no longer the recommended default for a new installation.

The native installer installs the Claude Code executable without requiring you to install Node.js or npm.

If you deliberately choose the npm distribution, Anthropic currently requires Node.js 22 or later for that package installation method.

Your development project may still need Node.js, Python, Git, or other tools independently of the Claude Code installer.

Do you need Git or Git Bash?

Git is useful for software development, but the installation requirements differ by operating system.

On native Windows, Git for Windows is optional. If it is available, Claude Code can use Git Bash for its Bash tool. Without it, Claude Code can use PowerShell.

Inside WSL, a Windows Git Bash installation is not required.

On macOS and Linux, you can install the Claude Code CLI independently of installing Git, although Git remains valuable for version control and safe code-change workflows.

How to Install Claude Code on Windows 10 or Windows 11

Windows users can install Claude Code directly through PowerShell, CMD, or WinGet.

You do not have to install a Linux virtual machine simply to use Claude Code.

For most beginners with an existing Windows development project, native installation is the simplest starting point.

Step 1: Open Windows PowerShell

Press Win + X and select Terminal or Windows PowerShell.

You should see a prompt resembling:

The PS prefix indicates that you are using PowerShell.

A traditional CMD window typically displays a prompt without PS.

Step 2: Run the official Windows PowerShell installer

Copy and execute:

This command downloads the official installation script and runs it.

irm is a PowerShell alias for Invoke-RestMethod. The iex command executes the downloaded script.

Run downloaded installer scripts only when you trust the source and your organization permits that installation method.

You normally do not need to launch PowerShell as Administrator for Claude Code's native installation.

Step 3: Open a new PowerShell window

After installation, close the old PowerShell window and open a new one.

This matters because an existing terminal may not immediately recognize changes to your PATH environment variable.

Now run:

If successful, Claude Code prints its installed version.

Step 4: Start Claude Code

Navigate to an existing project directory:

Replace the example path with your actual project folder.

Then run:

Claude Code will start an interactive session.

If this is your first launch, follow the account sign-in instructions.

Windows installation using CMD

If you prefer Command Prompt instead of PowerShell, use:

Run that command from CMD, not PowerShell.

It downloads the Windows installation script, executes it, and removes the downloaded script after successful execution.

After it completes, open a new CMD window:

Then:

Common mistake: Copying the PowerShell installation command into CMD or using CMD-specific && syntax in a PowerShell version that does not support it.

Use the correct command for the shell you opened.

Windows Installation Alternative: Install Claude Code with WinGet

WinGet is Microsoft's package-management command-line tool for Windows.

If WinGet is available on your computer, you can install Claude Code with:

After installation:

Why use WinGet?

WinGet can be convenient for developers or organizations that prefer package-managed software.

However, there is an important maintenance difference:

WinGet installations do not use Claude Code's native automatic update mechanism by default.

Update the package using:

Native installer vs. WinGet

Feature

Native PowerShell installer

WinGet

Windows support

Yes

Yes

Node.js required

No

No

Git for Windows required

No

No

Install command

Official PowerShell script

winget install

Updates

Native background auto-update

Manual package-manager upgrade by default

Best for

Simple recommended setup

Managed software installation

Both methods install Claude Code; you do not need to install both.

Avoid mixing several installation methods unless you have a specific reason.

How to Install Claude Code on Windows Using WSL 2

WSL stands for Windows Subsystem for Linux.

It allows you to run a Linux development environment inside Windows.

Choose WSL when your existing development workflow depends on Linux tools, Bash scripts, or a Linux-oriented project environment.

WSL 2 is also relevant when you need the Linux sandboxing features supported by Claude Code.

Native Windows vs. WSL 2

Decision factor

Native Windows

WSL 2

Installation complexity

Lower

Requires WSL setup

Uses Windows project tools

Directly

Through Windows/Linux interoperability

Linux shell and packages

Not required

Available

Git for Windows

Optional

Not required for Claude Code

Claude Code shell sandboxing

Not supported in the same way

Supported

Recommended scenario

Standard Windows projects

Linux toolchains and Linux-oriented development

Step 1: Install WSL

Open PowerShell as Administrator for the WSL setup step.

Run:

On compatible systems, this enables WSL and installs Ubuntu by default.

Restart Windows if prompted.

Microsoft documents additional manual setup procedures for unsupported or older Windows configurations.

Step 2: Open Ubuntu

Launch the installed Linux distribution from the Start menu or Windows Terminal.

The first launch may ask you to create a Linux username and password.

These are credentials for the WSL Linux environment, not your Claude account.

Step 3: Confirm your WSL version

From Windows PowerShell, you can check your distributions with:

Verify that the intended distribution uses WSL version 2.

Step 4: Install Claude Code inside WSL

Open the Ubuntu terminal, not Windows PowerShell.

Run:

Then:

The installer runs inside the Linux environment.

Step 5: Start Claude Code in a Linux project

For example:




This assumes the project directory exists. Replace it with the real path to your repository.

For many Linux-oriented development workflows, storing and working with the project inside the WSL Linux filesystem is preferable to repeatedly accessing files through Windows-mounted paths.

Common WSL mistakes

One frequent error is installing Claude Code in PowerShell and assuming the executable automatically exists inside Ubuntu.

Windows and WSL are separate execution environments.

Another problem is mixing Windows Node.js or npm paths with Linux tooling.

Use Linux-installed development dependencies when working inside the WSL environment.

Recommendation: If your entire workflow uses Windows-native projects, start with native Windows installation. If you already develop with Linux tools, consider WSL 2.

How to Install Claude Code on macOS

Claude Code supports macOS 13.0 and later, including supported Intel and Apple Silicon configurations.

The official native installer is the simplest starting point.

Step 1: Open Terminal

Press Command + Space, type Terminal, and press Enter.

Alternatively, open Terminal from your Applications utilities.

Step 2: Run the native installer

This downloads and executes the official macOS installation script.

Step 3: Check your installation

After the installer completes, open a new Terminal window.

Run:

You should see an installed Claude Code version number.

If your shell reports command not found, the installation may have succeeded but the executable directory might not be on your PATH.

The troubleshooting section below explains how to fix that.

Step 4: Open your project

Navigate to a project directory:

Then launch:

Claude Code will open its interactive terminal interface and prompt you to authenticate if necessary.

Alternative: Install Claude Code with Homebrew

If you already use Homebrew, you can install the stable Claude Code cask:

The stable cask is designed to follow Anthropic's stable release channel, which can be behind the latest release.

Anthropic also publishes a latest-channel cask:

For most users, choose one cask rather than installing both.

Updating a Homebrew installation

Homebrew installations require manual upgrades by default.

If you installed the stable cask:

If you selected the latest cask:

Which macOS installation should you choose?

Method

Advantage

Update behavior

Native installer

Recommended and straightforward

Native automatic updates

Homebrew stable

Fits an existing Homebrew workflow

Manual Homebrew upgrades

Homebrew latest

Provides the latest-channel package

Manual Homebrew upgrades

npm

Useful for a specific existing npm-management workflow

Manual package update

For a first-time installation, the native installer is usually the simplest choice.

How to Install Claude Code on Linux

The recommended native installer works on supported Linux distributions.

Anthropic lists Ubuntu 20.04+, Debian 10+, and Alpine Linux 3.19+ among supported configurations.

Additional distribution-specific dependencies may apply.

Step 1: Open your Linux terminal

Use your desktop terminal application or an authorized shell session.

Step 2: Run the official installer

The command uses curl to download the installation script and executes it with Bash.

Ensure both tools are available.

Step 3: Verify the installed executable

If Claude Code is installed correctly, this prints a version number.

You can also run:

The diagnostic command examines installation and configuration health.

Step 4: Start the application in your project




Follow the login flow.

Additional Linux installation methods

Anthropic also provides signed package repositories for several Linux package managers, including:

  • apt on Debian and Ubuntu.

  • dnf on compatible RPM-based distributions.

  • apk on Alpine.

These options can be useful in managed environments.

Package-manager installations generally use the distribution's update workflow rather than Claude Code's native background updater.

For full repository configuration and signing-key verification, follow Anthropic's official setup documentation rather than copying commands from an unverified third-party source.

Special case: Alpine Linux

Alpine uses a different C library environment from many mainstream Linux distributions.

For its documented shell-based setup, install the required packages first:

Anthropic also documents setting USE_BUILTIN_RIPGREP=0 for the relevant Alpine configuration.

Check that Alpine's community repository is enabled if ripgrep is unavailable.

Do not assume that instructions for Ubuntu apply unchanged to Alpine containers.

Can You Install Claude Code with npm?

Yes. Anthropic still supports npm as an alternative installation method.

The command is:

However, the npm distribution is no longer the preferred method for most new users.

npm installation prerequisites

For the npm package installation, Anthropic's documentation currently specifies Node.js 22 or later.

Check your Node.js and npm versions:




After installing:

The npm package installs a native Claude Code binary.

Node.js is part of the npm installation process; the Claude Code executable itself does not rely on running through Node.js at every launch.

Important npm safety advice

Do not use:

Anthropic explicitly warns against using sudo for the global npm installation because of permissions and security concerns.

If global npm permissions are incorrectly configured, fix the package-manager setup or use the recommended native installer.

How to update the npm version

Native installation vs. npm installation

Comparison

Native installer

npm package

Recommended for new users

Yes

Alternative

Node.js prerequisite

No

Yes, Node.js 22+ for installation

Global npm configuration

Not needed

Required

Native binary

Yes

Yes

Updates

Automatically with native installer

Manual npm upgrades

Best fit

General use

Existing npm-based tooling or provisioning

Recommendation: Unless you need npm for a specific development or provisioning workflow, use the native installer.

Step-by-Step Claude Code Login and Authentication

Installing the executable does not automatically grant access to Anthropic's models.

You need an eligible account or configured provider.

Which Claude accounts can use Claude Code?

Account or access method

Claude Code access

Billing considerations

Claude Free

Not included

Upgrading or another eligible method is required

Claude Pro

Supported

Subject to plan usage limits

Claude Max

Supported

Subject to plan usage limits

Claude Team / Enterprise

Supported when enabled and assigned

Organization-controlled access

Claude Console

Supported

API usage and credits apply

Supported enterprise cloud provider

Supported when configured

Provider-specific billing and permissions

Claude Code supports Amazon Bedrock, Google's supported cloud deployment options, and Microsoft Foundry through the appropriate enterprise configuration.

A standard ChatGPT subscription does not provide Claude Code access.

How to sign in

After installation, run:

Claude Code normally opens a browser authentication page.

Sign in with the appropriate Claude account and follow the prompts.

If the browser cannot automatically complete the callback, Claude Code can present a URL or code-based authentication flow.

This may occur in WSL, SSH sessions, containers, or restricted network environments.

Do you need an Anthropic API key?

Not necessarily.

If you use an eligible Claude subscription, you can authenticate through your Claude account.

A Console/API workflow may use an API key or supported Console authentication.

Do not assume that a Pro or Max subscription and an API key are the same billing arrangement.

Avoid exposing API keys

Never put your API key into a public GitHub repository, blog screenshot, shared example project, or client-side JavaScript bundle.

Use the credential-management approach supported by your environment.

If you need to switch accounts, use Claude Code's documented authentication commands.

What if login fails?

Try the following in order:

  1. Confirm your account has Claude Code access.

  2. Check that your subscription or Console access is active.

  3. Verify your network connection.

  4. Retry the browser login flow.

  5. Use /login inside Claude Code to authenticate again.

  6. Investigate organization policies or provider credentials if applicable.

Repeated login failures are not always installation failures.

A working executable can still be unable to authenticate because the account, organization, browser, or network is blocking the process.

Verify Claude Code Installation Before Your First Project

A good setup should pass more than one test.

Test 1: Confirm the command exists

Run:

This confirms the terminal can locate the executable.

Test 2: Run installation diagnostics

Claude Code checks relevant installation and configuration information and reports warnings.

Test 3: Launch an interactive session

Confirm that authentication succeeds and the interactive prompt opens.

Test 4: Open a real project

Navigate to an existing repository or create a safe test project.

For example:




Use a non-production project while learning how the assistant handles files and commands.

Test 5: Ask a read-only question

Inside Claude Code, type:




This is a useful first exercise because it helps you verify that the assistant can inspect the intended project.

Test 6: Inspect permission settings

Inside the Claude Code session, enter:

Review which actions require your approval.

Avoid enabling broad automatic permissions before understanding how commands, file changes, and external integrations work.

Your First Claude Code Project: A Safe Beginner Workflow

Once Claude Code is working, begin with a task that has a clear and verifiable outcome.

Consider a simple HTML or JavaScript website.

Exercise 1: Understand the code




Read Claude's explanation and verify the referenced files.

Exercise 2: Plan a small improvement




This helps establish whether Claude understands the project.

Exercise 3: Make one controlled change




Review the requested actions and approve only the changes you understand.

Exercise 4: Review the result




If you use Git, inspect the diff before accepting the result.

Exercise 5: Run an appropriate test

Ask Claude to identify the project's existing test or build commands.

Do not blindly execute an unfamiliar script without understanding what it does.

A successful setup is not just one where Claude Code starts. It is one where the assistant works in the intended project and you understand its permission boundaries.

Essential Claude Code Commands for Beginners

Some commands run in your normal terminal. Others run inside an active Claude Code session.

Terminal commands

Command

Purpose

claude

Open an interactive session

claude --version

Display installed version

claude doctor

Diagnose installation and setup

claude update

Request a manual update where supported

claude -p "question"

Run a non-interactive prompt and exit

claude -c

Continue the most recent conversation in the current directory

claude -r

Choose a previous conversation to resume

Commands inside Claude Code

Command

Purpose

/help

View available commands

/login

Sign in or change authentication

/logout

Sign out

/permissions

Review tool permissions

/doctor

Run diagnostics inside a session

/usage

Inspect available usage information

/model

View or choose supported models

/clear

Start with a fresh conversation context

/resume

Resume an earlier session

/mcp

Inspect configured MCP integrations

Availability and behavior can vary by installed version, provider, and account permissions.

For a new user, the most important commands are claude, claude --version, claude doctor, /help, and /permissions.

Fix Claude Code "Command Not Found" on macOS and Linux

A successful installation may still leave your shell unable to locate the executable.

For native macOS and Linux installations, Claude Code typically places its launcher in:

Your shell's PATH environment variable must include that directory.

Fix for macOS using Zsh




Then:

Fix for Linux using Bash




Then:

These commands add the local executable directory to the shell configuration.

Before repeating them, check whether your PATH already contains the directory so that you don't create unnecessary duplicate entries.

If the binary does not exist, the installer may not have finished correctly.

Do not try to solve every installation problem by changing PATH. First confirm that Claude Code actually installed and that you are using the correct shell.

Fix "Claude Is Not Recognized" on Windows

In PowerShell, an error resembling:

usually indicates that the command is not available through the current terminal's PATH.

First: Restart PowerShell

Close the terminal and open a new window.

Run:

Second: Check whether Claude Code exists

Use:

If it cannot locate the executable, check whether the native installer completed.

Third: Add the installation directory to user PATH

Anthropic's Windows guidance provides this PowerShell approach:

$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
[Environment]::SetEnvironmentVariable(
  'PATH',
  "$currentPath;$env:USERPROFILE\.

$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
[Environment]::SetEnvironmentVariable(
  'PATH',
  "$currentPath;$env:USERPROFILE\.

$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
[Environment]::SetEnvironmentVariable(
  'PATH',
  "$currentPath;$env:USERPROFILE\.

Before making a permanent PATH change, inspect the existing user PATH and avoid adding the same directory repeatedly.

Close the terminal afterward and open a new PowerShell window.

Fourth: Check for conflicting installations

If where.exe claude lists multiple executables, you may have an old npm installation, native installer, or separate package-managed version.

Verify which command takes precedence before uninstalling anything.

Removing an executable without checking its installation method can break a working setup.

Fix Git Bash and Windows Shell Errors

Not every Windows user needs Git Bash, but some workflows depend on the Bash tool.

Error: Git Bash cannot be found

Install Git for Windows if your workflow requires it.

If Git Bash is installed in a nonstandard location, configure the correct path.

For a typical installation, Claude Code can use a setting resembling:

{
  "env": {
    "CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\

{
  "env": {
    "CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\

{
  "env": {
    "CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\

Place this in the appropriate Claude Code settings file only if it is needed.

Do not replace unrelated existing configuration.

Error: irm is not recognized

You're likely using CMD instead of PowerShell.

Open PowerShell or use the official CMD installer.

Error: && is not a valid statement separator

You may have pasted the CMD installation command into an older PowerShell environment.

Use the PowerShell installer instead.

Error: Claude Code does not support 32-bit Windows

First verify that you are running a supported 64-bit Windows environment and did not open the 32-bit PowerShell executable on a 64-bit system.

Claude Code supports the documented x64 and ARM64 architectures, not 32-bit Windows binaries.

Error: PowerShell cannot execute a script

Check whether you are running the correct installer, whether your organization restricts script execution, and whether WinGet is a suitable alternative.

Avoid disabling organization-wide security policies just to make an installation work.

Claude Code Installation Troubleshooting Matrix

Use this table to match common symptoms with the next diagnostic step.

Error or symptom

Likely explanation

Recommended action

claude: command not found

Launcher missing from PATH

Check installation directory and PATH

'claude' is not recognized

Windows PATH or installation problem

Restart terminal, check where.exe, inspect PATH

Installer returns HTML

Download URL returned a web page rather than the script

Check network, region, proxy and official endpoint

Installer returns 403

Network restriction or availability issue

Check the official installation guide and network access

macOS dyld error

OS or binary compatibility problem

Confirm macOS 13+ and correct architecture

EACCES permission error

Installer or npm directory permissions

Correct permissions or use native installer

npm EBADENGINE warning

Node version doesn't meet package requirements

Use Node.js 22+ for npm installation

Windows shell not detected

PowerShell or Git Bash unavailable

Restore a supported shell

WSL install works but Windows doesn't recognize claude

Installation exists only in Linux environment

Run Claude Code inside WSL

Login keeps repeating

Expired credentials or account restrictions

Reauthenticate and verify account access

403 Forbidden after login

Account or organization authorization issue

Confirm Claude Code entitlement

Update doesn't take effect

Old executable or package-manager installation

Check installed executable and update method

Claude is slow on a large repository

Large context, heavy tools or extensions

Check /doctor, review resources and configuration

How to investigate network errors

The official installer downloads files from Anthropic infrastructure.

If the installer cannot connect, check your network, firewall, proxy settings, and any organizational restrictions.

You can test basic connectivity on macOS or Linux with:

On Windows PowerShell, use:

A successful network response helps distinguish a connectivity issue from a local shell or PATH issue.

A failed response should lead to network diagnosis—not to downloading an unknown installer from a third-party website.

How to Update Claude Code Safely

The right update command depends on how Claude Code was installed.

Installation method

Update command or process

Native installer

Automatic updates by default; claude update for manual checking

Homebrew stable

brew upgrade claude-code

Homebrew latest

brew upgrade claude-code@latest

WinGet

winget upgrade Anthropic.ClaudeCode

npm

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

Linux package manager

Use the package manager's normal upgrade process

Check the installed version

Run diagnostics after updating

For production development environments, avoid installing updates immediately before a critical release without understanding the change.

Teams may prefer a stable release channel and a controlled validation process.

How to Uninstall Claude Code

Uninstall Claude Code through the method you used to install it.

Do not remove your configuration directory unless you intentionally want to delete associated settings and local session state.

Homebrew

For the latest cask:

WinGet

npm

Native macOS or Linux installation

Anthropic documents removing the native launcher and installed version files using:




These commands remove the relevant native installation files.

Do not run them without confirming your installation method and the intended file paths.

What about configuration files?

Claude Code stores settings and session-related information separately.

Removing the executable does not necessarily remove all configuration data.

Deleting directories such as ~/.claude or configuration files may erase valuable settings, permissions, MCP configurations, and local session history.

Back up anything important before intentionally resetting configuration.

Claude Code Setup Best Practices for Developers

Installation is the first step. A safe and maintainable setup also requires basic workflow discipline.

Start with an appropriate project folder

Launch Claude Code inside the repository you intend to work on.

Avoid starting from a broad directory containing unrelated sensitive files when a narrower project directory will do.

Understand permissions before editing

Read-only exploration is a sensible first task.

Review file modifications, shell commands, and external integrations before approving them.

A command suggested by an AI assistant is still a command that may affect your local environment.

Use Git for meaningful code changes

Commit working code before starting substantial refactoring.

Review diffs and test changes before merging them into production branches.

Keep secrets out of the conversation

Don't paste API keys, production credentials, private database connection strings, or other secrets into project prompts.

Also review any proposed tool action that might expose sensitive files.

Start with specific prompts

Compare these two requests:

Vague: "Improve my project."

Specific: "Review the navigation component for accessibility issues. Explain your findings first, then suggest the smallest practical changes without editing files."

Specific tasks help you verify the outcome.

Add automation later

Once installation, authentication, basic permissions, and the normal coding workflow are functioning, you can consider Claude Code hooks, MCP servers, and reusable skills.

Those are advanced configuration topics and do not need to be enabled to complete a first installation.

For an overview of other AI-assisted development options, read our Best AI Coding Tools.

Claude Code Installation Checklist

Use this checklist to confirm your setup is complete.

  • My operating system and architecture are supported.

  • I have an eligible Claude subscription or supported account.

  • I selected one appropriate installation method.

  • I used the official installer or trusted package manager.

  • The installation completed without unexplained errors.

  • A new terminal recognizes claude --version.

  • claude doctor does not report unresolved critical installation issues.

  • Authentication works.

  • I can launch Claude Code inside the correct project directory.

  • Claude can explain my project's structure.

  • I have reviewed the permission settings.

  • I understand which commands may modify files.

  • Git or another reliable version-control workflow is available where needed.

  • I know how my installation receives updates.

  • I have not shared credentials or sensitive configuration values.

Common Claude Code Installation Mistakes

Installing Node.js unnecessarily

The recommended native installer does not require Node.js.

Only install Node.js when your project or chosen npm installation method requires it.

Assuming Windows requires WSL

Claude Code can run natively on supported Windows versions.

WSL is optional and useful for Linux-specific workflows.

Using several installers

Installing with native scripts, Homebrew, npm, and package managers simultaneously can create executable conflicts.

Prefer one managed installation per environment.

Confusing a Claude subscription with API billing

Claude subscriptions and Claude Console usage follow different access and billing arrangements.

Choose the correct authentication method for your account.

Working in the wrong directory

Claude Code operates in the context of the project and directory you launch it from.

Confirm the location before asking it to inspect or modify files.

Bypassing permissions before understanding them

Broad automatic permissions can increase the consequences of a mistaken instruction.

Begin with a controlled approval workflow.

Treating a version number as full setup verification

claude --version proves the executable is available.

It does not prove authentication, project access, permissions, or downstream integrations are configured correctly.

Final Recommendation: Choose Native Installation and Verify Each Step

For most new users, Anthropic's native Claude Code installer is the simplest choice.

Use PowerShell on Windows, or the official shell installer on macOS and Linux.

Choose WSL 2 when you specifically need a Linux development environment. Choose Homebrew, WinGet, or npm when those package managers fit your existing workflow.

After installing, verify the executable, authenticate with an eligible account, launch Claude Code inside a safe project, and begin with a read-only question.

Then learn permissions, Git-based review, and routine debugging before enabling advanced automations.

A reliable Claude Code installation should be easy to verify, straightforward to update, and safe to use in the projects you actually maintain.

Official References and Further Reading

FAQs

How do I install Claude Code on Windows 11 or Windows 10?

Open Windows PowerShell and run irm https://claude.ai/install.ps1 | iex. When installation finishes, open a new terminal and run claude --version to verify it. Then navigate to your project folder and enter claude to begin authentication. Claude Code supports native Windows installation, so WSL and Git Bash are not mandatory.

Do I need Node.js or npm to install Claude Code?

No. Anthropic's recommended native installer does not require Node.js or npm. The official macOS/Linux installer and Windows PowerShell installer install a native executable directly. If you choose the optional npm installation method, the npm package currently requires Node.js 22 or later. Your software project may have separate Node.js requirements.

Can I install and use Claude Code for free?

The Claude Code CLI can be installed without a separate installer purchase, but model usage requires an eligible account. Claude Code supports qualifying Claude Pro, Max, Team, or Enterprise access, Claude Console usage, and certain enterprise cloud providers. The standard free Claude plan does not include Claude Code access. API usage may incur separate charges.

How do I fix the “claude command not found” error?

First, reopen your terminal and run claude --version. If the command still fails, verify that Claude Code installed correctly and that its executable directory is included in PATH. Native macOS and Linux installations commonly use ~/.local/bin, while native Windows installations use the user's .local\bin directory. Run claude doctor when the command becomes available.

Is it better to install Claude Code on native Windows or WSL 2?

Native Windows is usually the simplest choice for Windows-based projects and tools. WSL 2 is useful if you already work with a Linux development environment, require Linux toolchains, or need compatible Linux sandboxing features. Both methods are supported. Choose the environment that matches where your project files and development dependencies are maintained.

Author

Shailesh Thakor
Shailesh Thakor

Webflow & Framer Developer | Web Design & SEO Enthusiast

Shailesh Thakor is a Webflow and Framer developer specializing in modern, responsive websites and user-friendly digital experiences. His interests include website performance, technical SEO, AI-powered tools, and SaaS technologies. Through 8Spark, he shares practical insights into website builders, digital tools, and emerging technologies, with a focus on helping businesses and individuals make informed technology decisions.