# Install Claude Code: setup on Mac, Windows and Linux

Install Claude Code with one command (curl -fsSL https://claude.ai/install.sh | bash on Mac and Linux, irm https://claude.ai/install.ps1 | iex in Windows PowerShell), then run claude in your project folder and sign in with a Pro, Max, Team, Enterprise or Claude Console account.

- Page: https://tecyfy.com/coding-agents/claude-code/setup
- Guide: Claude Code (https://tecyfy.com/coding-agents/claude-code), from Anthropic's documentation (https://code.claude.com/docs/en/overview)

Claude Code is 1 program you install once. After that you start it in any project folder by typing `claude`.

## Check you can run it

Claude Code needs a computer with:

- macOS 13 or later, Windows 10 (version 1809) or later, or Linux: Ubuntu 20.04, Debian 10, Alpine 3.19 or later.
- 4 GB of memory or more, and an internet connection. Your requests go to Claude's servers.
- A paid plan. Pro, Max, Team and Enterprise include Claude Code, and so does a Claude Console account, which is billed per token. The free claude.ai plan does not.

You also need a terminal: Terminal on a Mac, PowerShell on Windows. If you would rather not use one, the Claude Desktop app runs the same agent behind a window, and VS Code and JetBrains have extensions. This guide uses the terminal, because every other way runs the same engine and the terminal shows the most.

## Install with one command

Open a terminal and run the line for your system.

On a Mac, Linux or WSL:

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

In Windows PowerShell:

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

The installer prints nothing while it downloads, so give it a minute. You do not need administrator rights.

If you use a package manager instead, `brew install --cask claude-code` on a Mac and `winget install Anthropic.ClaudeCode` on Windows do the same job. There is also an npm package, `@anthropic-ai/claude-code`, which needs Node.js 22 or later. The native installer is the one Anthropic recommends, and the only one that updates itself.

On Windows you choose between running natively or inside WSL. Native suits Windows projects. Install Git for Windows as well if you can: Claude Code then runs commands in Git Bash, and without it uses PowerShell. Pick WSL 2 if your project lives in Linux, or if you want the sandbox, which limits the files and websites its shell commands can reach. It does not run on native Windows.

## Check it works

Open a new terminal window, so it picks up the new program, and run:

```bash
claude --version
```

A version number means it is installed. `command not found` almost always means the install folder is not on your PATH yet; a new terminal window fixes most cases. For a fuller check, `claude doctor` reports the install, your settings files and the last update without starting a session.

## Sign in

Go to a project folder and start it:

```bash
cd ~/code/my-project
claude
```

The first time, it opens your browser to sign in. Use the claude.ai account that holds your plan, or your Console account. If the browser cannot hand the login back to the terminal, which happens over SSH and in containers, it shows a code to paste into the terminal instead. You sign in once; the login is kept in your Mac's Keychain, or in a file only your user can read on Linux and Windows.

2 things that catch people:

- **An API key in your environment wins.** If `ANTHROPIC_API_KEY` is set and you approve it when asked, Claude Code bills that key, not your plan. Run `/status` inside a session to see which one is in use.
- **2 accounts need 2 folders.** To keep a work login and a personal one, start one of them with `CLAUDE_CONFIG_DIR=~/.claude-work claude`. Each folder keeps its own login, settings and history.

`/logout` signs you out, and `/login` switches account without leaving.

## Keep it up to date

The native install checks for updates when it starts and while it runs, downloads them in the background, and uses the new version the next time you open it. `claude update` updates at once.

If you would rather not be first, set the release channel to stable. It runs about a week behind and skips releases with major problems. Choose **Auto-update channel** in `/config`, or put this in your settings file:

```json
{
  "autoUpdatesChannel": "stable"
}
```

Homebrew and WinGet installs do not update on their own: run `brew upgrade claude-code` or `winget upgrade Anthropic.ClaudeCode` now and then. With Homebrew, the `claude-code` cask follows stable and `claude-code@latest` follows the newest release.

## Where to go next

With it installed, [run a first session](/coding-agents/claude-code/first-session) on a real project, then read [how it works](/coding-agents/claude-code/how-it-works) so its behaviour makes sense. Before you let it run for long, set what it may do on its own in [permissions](/coding-agents/claude-code/permissions).

## Questions

### Is Claude Code free?

No. It needs a paid Claude plan (Pro, Max, Team or Enterprise) or a Claude Console account billed by the token. The free claude.ai plan does not include it. Companies can also run it through Amazon Bedrock, Google Cloud or Microsoft Foundry.

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

Not with the native installer, Homebrew or WinGet, which install a single program. Only the npm package, @anthropic-ai/claude-code, needs Node.js, version 22 or later.

### Why does my terminal say "claude: command not found" after installing?

The folder the installer used is not on your PATH yet. Open a new terminal window first, since the old one still has the old PATH. If it still fails, follow the PATH fix in the official troubleshooting page for your system.

### How do I update Claude Code?

The native install updates itself in the background, and the new version starts next time you open it. Run claude update to update at once. Homebrew and WinGet installs do not update themselves; use brew upgrade claude-code or winget upgrade Anthropic.ClaudeCode.

### Should I use WSL or native Windows?

Native Windows suits Windows projects and needs nothing extra, though Git for Windows lets it use Bash. WSL 2 suits Linux toolchains and is the only Windows option where its sandbox for commands works.

## Sources

- [Advanced setup](https://code.claude.com/docs/en/setup)
- [Authentication](https://code.claude.com/docs/en/authentication)
- [Quickstart](https://code.claude.com/docs/en/quickstart)
- [Platforms and integrations](https://code.claude.com/docs/en/platforms)
