✻Founding-member pricing: every lesson for $19/mo. The first 3 lessons are free. Start lesson 1 →
Unit 1 · Claude Code Foundations · Lesson 3 of 40

Install Claude Code & Run Your First Prompt

Install Claude Code on macOS, Linux or Windows, sign in, and run your first prompts: explore a codebase, make a change and review the diff.

FREE12 min+74 XP5-question quiz

🎯 By the end of this lesson you'll be able to

  • Install Claude Code with the native installer
  • Sign in and start a session in a project
  • Run exploration prompts and make a first change
  • Learn the essential shortcuts and input prefixes

Install in one line

The native installer is the recommended way to install Claude Code. It installs the claude command and keeps it up to date automatically.

macOS, Linux or WSL
curl -fsSL https://claude.ai/install.sh | bash
Windows PowerShell
irm https://claude.ai/install.ps1 | iex

Prefer a package manager? Homebrew works too (brew install --cask claude-code), but then you update it yourself. Verify the install with:

bash
claude --version
claude doctor   # checks your install and configuration

Sign in and open a project

Claude Code works on the folder you start it in. Always cd into your project first:

bash
cd ~/code/my-app
claude

The first run opens a browser to sign in with your Claude subscription or Console account. You can switch accounts later with /login.

✓
No project handy?

Clone any small open-source repo and practice there. Reading an unfamiliar codebase is one of the best first uses of Claude Code, and you can't break anything that matters.

Your first three prompts

Start by exploring before you change anything. Good first prompts:

text
give me an overview of this codebase
how is authentication handled here? point me to the key files
what's the command to run the tests, and do they pass right now?

Then make a small, checkable change:

▶Watch it runYour first edit
Your first edit

Notice what Claude did after editing: it ran the command to prove the change works. You'll want that pattern everywhere.

Shortcuts that make you fast

InputWhat it does
/Slash commands and skills: /help, /clear, /compact, /model…
@Mention a file or folder to pull it into context: @src/auth/session.ts
!Shell mode: runs a command directly and adds its output to context
EscInterrupt Claude (work so far is kept)
Esc EscWith an empty prompt: open the rewind menu
Shift+TabCycle permission modes
Ctrl+RSearch your prompt history
Ctrl+VPaste an image, such as a screenshot of a bug
?On an empty prompt: shortcut help
⌨Type the command+15 XP

You want Claude to look at a specific file, src/app.ts. What do you type in the prompt to reference it?

❯

Starting, continuing, resuming

bash
claude                      # new interactive session
claude "explain this repo"  # start with a prompt
claude -c                   # continue your most recent conversation here
claude -r                   # pick an earlier session to resume

Inside a session, /resume opens the same session picker. Sessions are saved locally, so closing your terminal doesn't lose your work.

☑Before you move onsaved on this device

Check your understanding

?Lesson quiz10 XP per correct answer · +25 for a perfect score
QUESTION 1 OF 5

Which folder does Claude Code work on?

Why: Claude Code's working directory is where you run claude. Always cd into the project first.
QUESTION 2 OF 5

What does the ! prefix do in the prompt?

Why: Shell mode is perfect for quick commands whose output you want Claude to see.
QUESTION 3 OF 5

Which command continues your most recent conversation in the current folder?

Why: -c / --continue picks up your latest session there. -r / --resume lets you choose an older one.
QUESTION 4 OF 5

After making a change, what's the habit you want Claude to show?

Why: Verification is the core habit of great agentic work. Ask for proof, not promises.
QUESTION 5 OF 5

What does pressing Esc twice on an empty prompt do?

Why: The rewind menu lets you roll back code and conversation to an earlier point.
0 / 5 correct
Academy lesson

Unlock lesson 3 and the next 37

You've finished the free lessons. Join the Academy for $19/month to unlock every lesson, quiz, terminal simulation and puzzle, plus the final exam and your certificate of completion.

  • All 40 lessons across 9 units
  • 165+ quiz questions
  • Final exam + certificate
  • New lessons as Claude Code evolves
  • XP, streaks and badges
  • Cancel anytime

Already a member? Log in to continue.

Key takeaways

  • Install with the native installer. It keeps claude updated automatically.
  • Always start Claude Code inside your project folder.
  • Explore first, then make small changes Claude can verify.
  • Learn /, @, !, Esc and Shift+Tab. They're most of what you'll use.

Nice work. Lesson 3 done?

Mark it complete to earn +74 XP, keep your streak alive and unlock badges.

Written by Curtis Cornell from Anthropic's public Claude Code documentation. Last reviewed November 14, 2026. Claude Code changes fast; if something here differs from your version, the official docs win.

Start lesson 1 free →