Install Claude Code step by step
How to install Claude Code on Windows, macOS or Linux, check that it works, sign in and take your first steps in the terminal.
On this page
In the previous guide we looked at the different ways to use Claude. Here we install Claude Code in the terminal, the option we'll use for the rest of the series. It takes a few minutes.
Before you start
Make sure you have:
- A supported system: macOS 13 or later, Windows 10 (version 1809) or later, or a recent Linux distribution such as Ubuntu 20.04+ or Debian 10+.
- At least 4 GB of RAM and an internet connection.
- An account that includes Claude Code: a Pro plan or higher, or a pay-as-you-go Anthropic Console account. The free plan doesn't include it.
If you'd rather not use the terminal, the desktop app has Claude Code built into its Code tab. This guide focuses on the terminal because it's the foundation for the rest of the series.
Step 1: open a terminal
- Windows: search for PowerShell in the Start menu. You'll know you're in PowerShell because the line starts with
PS C:\. If it starts with justC:\, you're in CMD (the classic command prompt). - macOS: open Terminal from Spotlight (
Cmd + Spaceand type "Terminal"). - Linux: open your distribution's terminal (on many,
Ctrl + Alt + T).
Step 2: install Claude Code
The recommended way is the official installer, because it updates itself. Copy the command for your system and paste it into the terminal:
macOS, Linux or WSL:
curl -fsSL https://claude.ai/install.sh | bash
Windows (PowerShell):
irm https://claude.ai/install.ps1 | iex
Windows (CMD):
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
The installer doesn't show a progress bar: it's normal for it to look idle while it downloads. Wait until the prompt comes back.
Package manager alternatives
If you already use a package manager, you can also install it this way:
brew install --cask claude-code
winget install Anthropic.ClaudeCode
Keep in mind that these installs don't update themselves: you'll need to update them from time to time with the same package manager.
If you're on Windows
- You don't need administrator rights to install it.
- Installing Git for Windows is recommended: it lets Claude Code use Git Bash to run commands. Without it, it uses PowerShell, which also works.
- If you work with Linux tooling, you can install it inside WSL with the Linux command. In that case, always launch it from the WSL terminal.
Step 3: check that it works
Close the terminal and open a new one (so it picks up the newly installed command). Then type:
claude --version
If you see a version number followed by (Claude Code), you're all set. For a fuller diagnosis:
claude doctor
Step 4: start your first session
Go into any project folder (here we use a sample one called my-project) and launch Claude Code:
cd my-project
claude
The first time, it asks you to sign in: your browser opens so you can log in with your Claude or Anthropic Console account. When you're done, go back to the terminal. Your credentials are saved, so you won't need to repeat it.
Step 5: your first commands
Once inside Claude Code, try writing to it in plain language:
what does this project do?
Claude reads the files it needs and gives you a summary. You don't need to paste the context yourself.
A few handy shortcuts to start with:
| Command or shortcut | What it's for |
|---|---|
/help | See the available commands |
/login | Switch accounts or sign in again |
/clear | Start a new conversation |
Shift + Tab | Change how much Claude can do without asking you |
/exit or Ctrl + D twice | Quit Claude Code |
By default, Claude asks for permission before editing files or running commands. Read what it proposes and accept only what makes sense.
Keeping it up to date
If you used the official installer, it updates itself in the background. To force an update:
claude update
Common issues
| If you see… | Try this |
|---|---|
claude isn't recognized as a command | Close and open a new terminal. If it still fails, the install folder isn't on your PATH: run claude doctor or check the official troubleshooting guide. |
The token '&&' is not a valid statement separator | You're in PowerShell using the CMD command. Use the PowerShell command. |
'irm' is not recognized… | You're in CMD using the PowerShell command. Use the CMD command. |
| It asks for a plan when you sign in | Your account is on the free plan. Claude Code needs Pro or higher, or a Console account. |
Next step
You now have Claude Code installed and working. In the next guide we'll do your first real task with it: ask for a change in a sample project, review it and accept it.
The commands in this guide follow the official documentation as of the last update. If anything changes, the Claude Code documentation always has the latest version.