How to start with Claude Code: install, sign in and run your first command
Install Claude Code on macOS, Linux or Windows, sign in with your Claude account and ask your first question about your project, step by step.
Claude Code is Anthropic’s coding tool that runs in your terminal, reads your project and makes changes when you ask [1]. This guide covers the three first steps from the official quickstart: install, sign in and give your first command [1].
What you need
- A terminal and a code project to work in [1].
- A paid Claude plan (Pro, Max, Ultra, Team or Enterprise), a Claude Console account, or access through a supported cloud provider [1]. The free claude.ai plan does not include Claude Code [2].
- macOS 13.0 or newer, Windows 10 1809 or newer (or Windows Server 2019+), or Ubuntu 20.04 or newer, with at least 4 GB of RAM and an internet connection [2].
Step 1: Install
The recommended way is the native installer [1]. On macOS, Linux or WSL, run:
curl -fsSL https://claude.ai/install.sh | bash
On Windows PowerShell, run [1]:
irm https://claude.ai/install.ps1 | iex
On Windows CMD, run [1]:
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
If you prefer a package manager, Homebrew and WinGet also work [1]:
brew install --cask claude-code
winget install Anthropic.ClaudeCode
The native install updates itself in the background, while Homebrew and WinGet installs need a manual upgrade by default [1][2]. On native Windows, the docs recommend Git for Windows so Claude Code can use its Bash tool; without it, Claude Code uses PowerShell instead [1].
Step 2: Check the install
Open a new terminal window and check the version [1]:
claude --version
A working install prints a version number followed by (Claude Code) [1]. If the shell says claude is not found, the install folder is not on your PATH yet [1]. For a fuller check of the install and settings, run claude doctor [2].
Step 3: Start a session and sign in
Go to your project folder and start Claude Code [1]:
cd /path/to/your/project
claude
On first use, Claude Code asks you to log in, and Claude subscription or Console accounts finish the sign-in in the browser [1]. If you have set the ANTHROPIC_API_KEY environment variable and approve the key when Claude Code asks, it skips the login prompt [1]. Claude Code keeps the login, and you can switch accounts later by typing /login inside a session [1].
Step 4: Your first command
Type a question in plain language, for example [1]:
what does this project do?
Claude reads the files it needs and gives you a summary, so you do not have to paste context yourself [1]. Next, try a small change [1]:
add a hello world function to the main file
Claude Code shows the change, and if it asks first, choose Yes to approve [1]. Press Shift+Tab to switch the permission mode, which sets what Claude may do without asking [1].
Commands worth knowing
Sources
Written and checked by AI from the sources below
Fact-checked by gpt-6.1-sol on · Editorial policy