The Navigator · 9 min mission

Start Here: Your First Session with Claude Code

Install Claude Code, run your first agentic session, and understand the loop behind it.

basicsinstallmental modelFact-checked 2026-06-13
On this page

Claude Code is an agentic coding tool: you describe an outcome, and it reads your codebase, edits files, runs commands, and iterates until the outcome is real — all from your terminal, IDE, desktop app, or browser.

That one sentence hides a mental-model shift. You are not autocompleting lines anymore; you are directing an agent that acts. This guide gets you from zero to a productive first session and installs the right instincts from the start.

What Claude Code actually is

Under the hood, every session is a loop: Claude reads your request, gathers context with tools (reading files, searching, running commands), takes an action, observes the result, and repeats until done. Everything else — memory files, skills, hooks, subagents — exists to make that loop smarter, safer, and faster.

Install in three moves

  1. Install the CLI

    Run the native installer: curl -fsSL https://claude.ai/install.sh | bash on macOS/Linux. Node-based install via npm install -g @anthropic-ai/claude-code also works.

  2. Authenticate

    Launch claude in any project directory. The first run opens a browser to sign in with your Claude account or API key.

  3. Verify

    Run claude doctor to confirm the install is healthy before your first real task.

your first session
… scroll to run this session
A real first session: Claude explores before it edits — that exploration is the loop working, not hesitation.

The loop you are now part of

Your job in the loop is judgment: define the outcome, supply constraints, and verify results. Claude's job is execution. The biggest beginner mistake is treating it like a search engine — issuing vague one-liners and accepting the first answer. Treat it like a sharp new teammate instead: give it the context you would give a person.

CommandWhat it does
/helpLists available commands and shortcuts
/clearResets the conversation context between tasks
/compactSummarizes the session to reclaim context space
/modelSwitches the underlying Claude model
/initGenerates a starter CLAUDE.md for the project
The first five slash commands worth knowing.

Knowledge check

You finished a bug fix and want to start an unrelated feature. What should you usually do first?

Vague vs. directed

Vague ask

“fix the login bug”

Claude has to guess which bug, which file, and what “fixed” means.

Directed ask

“Login fails with a 401 after password reset — see auth/reset.ts. Reproduce with npm test auth, fix it, and keep the existing session API unchanged.”

Outcome, evidence, constraint: the loop converges in one pass.

Pick your install path

The native installer (curl … | bash) is the recommended route and the only one that auto-updates in the background. [V] Every other method — Homebrew, WinGet, Linux package managers, npm — installs the same native binary but leaves you to upgrade on your own schedule. [V] Pick the row that matches how you already manage software on the machine.

Platform / managerCommandNotes
macOS / Linux / WSL (native)curl -fsSL https://claude.ai/install.sh \| bashRecommended. Auto-updates in the background.
Homebrew (macOS/Linux)brew install --cask claude-codeTracks stable (~1 week behind). claude-code@latest cask tracks latest. No auto-update.
Windows (WinGet)winget install Anthropic.ClaudeCodewinget upgrade Anthropic.ClaudeCode to update.
Debian / Ubuntusudo apt install claude-codeAfter adding the signed downloads.claude.ai apt repo + keyring.
Fedora / RHELsudo dnf install claude-codeAfter adding the claude-code dnf repo (gpgcheck=1).
Alpineapk add claude-codeAfter adding the apk repo + RSA key. Native installer also needs libgcc libstdc++ ripgrep.
npm (any platform)npm install -g @anthropic-ai/claude-codePulls the same native binary. Needs Node 18+. Never use sudo.
Install matrix [V]. The native script auto-updates; package-manager installs do not — upgrade them manually.

Drive the session from the keyboard

Most of your speed gains come from four keystrokes, not from typing longer prompts. The two that matter most on day one are the permission-mode cycle and the rewind. [V]

KeysWhat it does
Shift+TabCycles permission modes: defaultacceptEdits (auto-applies edits) → plan (reads and proposes, edits nothing) → back. The fastest way into and out of plan mode mid-session.
Option+P / Alt+PSwitches the active model without clearing your prompt. (macOS needs Option configured as Meta in your terminal.)
! (line start)Shell mode: runs the command directly — e.g. ! npm test — and adds its output to the context without asking Claude to interpret or approve it.
Esc EscOn an empty prompt, opens the rewind menu to restore code and conversation to an earlier point. With text in the prompt, it clears the draft (saved to history) instead.
The four shortcuts to internalize first. [V]

Reach the end and this star joins your charted sky.