Everything you need to go from zero to your first AI-powered coding session, on macOS, Windows, or Linux.
Everything you need to go from zero to your first AI-powered coding session, on macOS, Windows, or Linux.
In this guide you’ll install Claude Code, log in, navigate to a project, ask your first questions, make code changes, and use Git—all via natural language in the terminal, with step‑by‑step commands for macOS, Windows, and Linux.
Everything you need to go from zero to your first AI-powered coding session, on macOS, Windows, or Linux.
If you've been hearing about Claude Code and wondering how to actually get it running on your machine, this guide walks you through every step. Claude Code is Anthropic's agentic coding tool. It lives in your terminal and works alongside you on real projects: reading files, writing code, running tests, and handling Git, all through natural conversation.
The whole setup takes under two minutes. Here's exactly what to do.
Before you start: You'll need a Claude Pro, Max, Team, or Enterprise subscription, or a Claude Console API account. If you don't have one yet, head to and sign up before continuing.
The ultimate shortcut to flawless AI results
Stop wasting time guessing prompts. Get consistent, professional AI results right from the first try, every time.
On macOS, open the Terminal app (Applications → Utilities, or press `⌘ Space` and type "Terminal"). On Windows, open PowerShell or Command Prompt via the Start menu. On Linux, use your distro's terminal emulator.
If you've never used a terminal before, Anthropic has a beginner terminal guide worth a quick read first.
Step 2: Run the install command
Copy and paste the command for your operating system, then press Enter. The installer handles everything automatically.
macOS, Linux, or WSL:
1curl-fsSL https://claude.ai/install.sh |bash
Windows PowerShell:
1irm https://claude.ai/install.ps1 |iex
If you see "The token '&&' is not a valid statement separator", you're in PowerShell, not CMD. If you see "'irm' is not recognized", you're in CMD. Use the command below instead.
Windows CMD:
1curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
On macOS and Linux, the native installer auto-updates in the background. Windows users installing via Homebrew (`brew install --cask claude-code`) or WinGet (`winget install Anthropic.ClaudeCode`) will need to run the upgrade command manually to stay current.
Step 3: Log in and authenticate
Once installation is complete, type `claude` and press Enter. On first launch, Claude Code will prompt you to log in:
1claude
A browser window will open. Click Authorize to link Claude Code to your Anthropic account. Your credentials are stored after this, so you won't need to log in again. To switch accounts later, type `/login` inside Claude Code.
Step 4: Navigate to a project and start Claude Code
Claude Code works inside your project directory. Navigate to any existing project and launch it:
1cd /path/to/your/project
2claude
You'll see the Claude Code welcome screen with your session info and recent conversations. Type `/help` to see available commands, or `/resume` to pick up where you left off.
Step 5: Ask your first question
Start by letting Claude explore your codebase. You don't need to manually point it at files. It reads what it needs on its own. Try something like:
1what does this project do?
1what technologies does this project use?
1explain the folder structure
Claude will analyze your files and give you a summary. This is a good first step before asking it to make any changes.
Step 6: Make your first code change
Once Claude understands your project, you can ask it to write or edit code in plain English:
1add a hello world function to the main file
Claude Code will find the right file, show you the proposed changes, and ask for your approval before touching anything. You can approve individual changes or enable "Accept all" mode for the entire session. It always asks first.
Step 7: Use Git through Claude
Git operations become conversational. Ask things like:
1what files have I changed?
1commit my changes with a descriptive message
1create a new branch called feature/quickstart
1help me resolve merge conflicts
What else Claude Code can do
The same conversational approach works for more complex tasks. A few things worth trying once you're comfortable with the basics:
Fix a bug:
1there's a bug where users can submit empty forms - fix it
Refactor code:
1refactor the authentication module to use async/await instead of callbacks
Write tests:
1write unit tests for the calculator functions
Update documentation:
1update the README with installation instructions
Code review:
1review my changes and suggest improvements
Essential commands
Command
What it does
`claude`
Start interactive mode
`claude "task"`
Run a one-time task and exit
`claude -p "query"`
One-off query, then exit
`claude -c`
Continue most recent conversation
`claude -r`
Resume a previous conversation
`/clear`
Clear conversation history
`/help`
Show available commands
`exit` or `Ctrl+D`
Exit Claude Code
Tips for better results
Be specific. Instead of "fix the bug", try "fix the login bug where users see a blank screen after entering wrong credentials." The more context you give, the more useful the output.
Break complex tasks into steps. For larger features, spell out the sequence:
11. create a new database table for user profiles
22. create an API endpoint to get and update user profiles
33. build a webpage that allows users to see and edit their information
Let Claude explore before editing. Before making changes to an unfamiliar part of a codebase, ask Claude to analyze it first. Understanding the structure leads to better, less disruptive edits.
Use keyboard shortcuts. Press `?` inside Claude Code to see all available shortcuts. Tab completes commands, ↑ cycles through history, and `/` lists all commands and skills.
For questions while you're working, type `/help` or just ask Claude directly: "how do I…" and it will guide you. The full documentation is at code.claude.com/docs.
Summary
Install Claude Code with a single curl or PowerShell command.
Log in via browser and authenticate your Anthropic account.
Open a project folder and start an interactive Claude session.
Ask natural‑language questions, edit code, and manage Git.
Follow tips for precise prompts and advanced tasks like testing and refactoring.