Claude Code is an AI assistant from Anthropic that works in the terminal. The terminal is a window where you type commands instead of clicking. You type a request in plain words, and Claude Code reads your files, makes changes and runs commands. By default it asks you before it edits a file or runs a command.
Before you start, check two things:
- Your computer. Anthropic lists macOS 13 or newer, or Windows 10 (version 1809) or newer, with at least 4 GB of memory.
- Your account. You need a paid Claude plan (Pro, Max, Team or Enterprise) or a Claude Console account. The free Claude plan does not include Claude Code. A Console account bills you for each use. You pay Anthropic directly.
New to the terminal? First read How to open the terminal.
Open the terminal
- Mac: press Command + Space, type
Terminal, then press Return. - Windows: press the Windows key, type
PowerShell, then press Enter.
On Windows, look at the start of the line. PS C:\Users\YourName> means you are in PowerShell. C:\Users\YourName> without PS means you are in CMD, an older Windows terminal. The install commands for the two are different.
Paste the install command
Copy the line for your computer, paste it into the terminal, then press Return or Enter.
Mac (and Linux):
curl -fsSL https://claude.ai/install.sh | bashWindows PowerShell:
irm https://claude.ai/install.ps1 | iexWindows CMD:
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdThe command shows no progress while it downloads. Leave the window open and wait. When it is done, you see Claude Code successfully installed! You do not need Run as administrator on Windows.
Open a new terminal window
Close the window and open a new one. A new window finds programs that you installed a moment ago.
Check that it worked
Type this and press Return or Enter:
claude --versionYou see a version number followed by (Claude Code). If you see an error instead, go to If it did not work below.
Start Claude Code and sign in
Type this and press Return or Enter:
claudeA browser window opens. Sign in with the Claude account that has your paid plan. If the browser does not open, press c to copy the sign-in link, then paste it into your browser. You sign in only once on each computer.
When you see the prompt with a version, a model name and a folder name above it, Claude Code is ready. Next, read Your first session with Claude Code.
If it did not work
zsh: command not found: claude (Mac) or 'claude' is not recognized as an internal or external command (Windows)
The install worked, but the terminal does not know where the program is yet. The PATH is the list of folders where the terminal looks for programs. First, open a new terminal window and try again. If it still fails on a Mac, run these two lines, one at a time:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrcOn Windows, run these two lines in PowerShell, then open a new window:
$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
[Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')'irm' is not recognized or The token '&&' is not a valid statement separator (Windows)
You pasted the command for the other Windows terminal. irm works only in PowerShell. The curl ... && ... line works only in CMD. Use the line that matches your window.
A parameter cannot be found that matches parameter name 'fsSL' (Windows)
You pasted the Mac command into PowerShell. Use the Windows PowerShell line instead.
bash: line 1: syntax error near unexpected token '<' (Mac)
The download returned a web page instead of the installer. If the text says "App unavailable in region", Claude Code is not available in your country. Otherwise, wait a few minutes and try again. If you use Homebrew (an app installer for the Mac), you can install with this line instead:
brew install --cask claude-codeFor other errors, open Anthropic's troubleshooting page.
Sources
- code.claude.com/docs/en/setup
- code.claude.com/docs/en/quickstart
- code.claude.com/docs/en/terminal-guide
- code.claude.com/docs/en/troubleshoot-install
- code.claude.com/docs/en/authentication