How to install Claude Code on macOS, Linux and Windows

Step-by-step installation of Claude Code with the native installer or npm, first sign-in, project setup with CLAUDE.md, the VS Code and JetBrains integrations, common errors, and how to run it through an EU region or a gateway.

Walma Engineering·Updated 11 September 2026·8 min read

Installing Claude Code takes under two minutes. The problems come afterwards: not signed in, wrong project folder, no CLAUDE.md, or the question of where the data actually goes. This guide walks through everything in order. For what Claude Code is and does, start with the overview.

Requirements

  • macOS 10.15 or later, Linux (Ubuntu 20.04+, Debian 10+ or equivalent) or Windows 10/11.
  • On Windows: Git for Windows, because Claude Code uses its Bash for shell commands. WSL 1 or 2 also works.
  • A terminal and internet access.
  • An Anthropic account (Pro, Max, Team or Enterprise) or an API key or access to Bedrock, Vertex AI or Microsoft Foundry.

Node.js is only needed for the npm route.

The native installer places a self-contained binary and keeps it up to date automatically.

# macOS and Linux
curl -fsSL https://claude.ai/install.sh | bash
# Windows, PowerShell
irm https://claude.ai/install.ps1 | iex

Open a new terminal and check:

claude --version

Option 2: npm

If Node.js 18 or later is installed:

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

Do not use sudo. If npm cannot install global packages without root, configure a user-level prefix or use the native installer instead.

First sign-in

Change into a project folder and start the agent:

cd ~/projects/my-repo
claude

On first launch a browser window opens for sign-in. You can use a Claude account (Pro, Max, Team, Enterprise) or an Anthropic Console account (API billing). After that the agent is ready.

For scripts, CI and environments without a browser, set a key instead:

export ANTHROPIC_API_KEY=sk-ant-...

Setting up the project

The most important step after installation is a CLAUDE.md in the repository. It is loaded every session and should say how the project is built and tested, which conventions apply, and what the agent must not touch.

> /init

drafts one from what the agent finds in the repo. Edit it and commit it; it then applies to the whole team.

Other useful commands inside a session:

CommandPurpose
/helpAll commands
/statusVersion, account, model, context
/mcpShow and authenticate MCP servers
/permissionsAllowed and blocked actions
/clearClear the context

Editor integration

Claude Code is editor-independent but integrates with the common ones:

  • VS Code: install the extension from the marketplace; diffs appear in the editor.
  • JetBrains (IntelliJ, PyCharm, WebStorm and the rest): plugin from the marketplace.
  • Any editor's terminal: works everywhere, no plugin.

Common errors

claude: command not found. Restart the terminal so the PATH is refreshed. With npm, check that the global bin directory is on the PATH (npm bin -g).

Windows: shell commands fail. Git for Windows is missing or not on the PATH. Restart the terminal after installing Git.

Sign-in fails on a corporate network. Set proxy variables (HTTPS_PROXY); with TLS inspection, register the corporate certificate with Node or the system store.

"Rate limit" or allowance exhausted. Pro and Max have usage windows; API accounts have account limits. See Claude Code pricing.

Running through an EU region

By default, requests go to Anthropic in the US. If your data protection rules require EU processing, run Claude Code through one of the supported cloud providers. The switch is environment variables, for example for Bedrock:

export CLAUDE_CODE_USE_BEDROCK=1
export AWS_REGION=eu-central-1

Equivalent variables exist for Vertex AI and Microsoft Foundry. Developers keep using the same tool; only the backend changes.

Running through a gateway

For more than a handful of developers, the region alone is not enough. You need one place for model approvals, budgets, allowed MCP servers and the log. Claude Code supports a configurable base URL so that every request goes through a gateway:

export ANTHROPIC_BASE_URL=https://hub.your-company.eu
export ANTHROPIC_AUTH_TOKEN=...

Walma AI Hub is such a gateway, running in your own Azure tenant in an EU region. Developers install a signed client for Windows and macOS that sets this configuration, and work with one key for Claude Code, Codex, Cursor and every approved MCP server. Policy is enforced in the gateway, not on the laptop. More about AI Hub.

Frequently asked questions

Do I need Node.js to install Claude Code?+

Not any more. The native installer is self-contained. Only the npm route requires Node.js 18 or later.

How do I update Claude Code?+

The native installer updates itself in the background. With npm, run npm install -g @anthropic-ai/claude-code again. Inside a session, /status shows the current version.

Claude Code won't start on Windows. What should I check?+

Make sure Git for Windows is installed; Claude Code uses its Bash for shell commands. Restart the terminal after installing so the PATH is refreshed. As an alternative, Claude Code runs reliably inside WSL.

Can I use Claude Code without an Anthropic account?+

Yes, with an API key via the ANTHROPIC_API_KEY environment variable, or through Amazon Bedrock, Google Vertex AI or Microsoft Foundry using those clouds' credentials.

How do I use Claude Code in VS Code?+

Install the Claude Code extension from the VS Code marketplace; diffs then appear in the editor and you can start sessions from the sidebar. Running the CLI in VS Code's integrated terminal works too, with no extension.

Walma AI Hub

The same tools, in your EU region, under your control

A 20-minute walkthrough with an engineer. We map it to your tools, your MCP servers and your budget model.

About AI Hub