Claude Code Tutorial for Beginners: Install, First Session, and Your First Real Task

Claude Code Tutorial for Beginners: Install, First Session, and Your First Real Task

@Ambika Iyer
Aug 23, 2026
10 min
#claude code tutorial#claude code for beginners#how to use claude code#claude code install#claude code getting started
$ cat article.md | head -n 3
A complete Claude Code tutorial for beginners — install it, log in, understand permission modes, and walk through a real first task, from exploring a codebase to committing a fix.

Claude Code is a terminal tool, not a chat window — it reads your actual project, edits real files, and runs commands, rather than you pasting code back and forth. This walks through installing it, your first session, and one full real task from start to finish.

Try copy-paste prompt templates

Continue in the free prompt library — organised by style and use case.

What Claude Code actually does

Claude Code reads your codebase, edits files directly, runs shell commands, and works across multiple files in a single session. You describe a task in plain English — "add input validation to the signup form," "there's a bug where empty submissions go through, fix it" — and it finds the relevant code, makes a plan, and implements it, asking for your approval before changing anything (exactly how much approval it asks for is controlled by permission mode, below).

It runs in several places — the terminal, VS Code, JetBrains IDEs, a desktop app, and the browser at claude.ai/code — all backed by the same underlying engine, so settings and project context carry over between them. This tutorial covers the terminal, which is where most people start.


Installing Claude Code

macOS, Linux, or WSL:

prompt
curl -fsSL https://claude.ai/install.sh | bash

Windows PowerShell:

prompt
irm https://claude.ai/install.ps1 | iex

Homebrew and WinGet are also supported if you prefer a package manager:

prompt
brew install --cask claude-code       # macOS
winget install Anthropic.ClaudeCode   # Windows

Confirm it installed correctly:

prompt
claude --version

This should print a version number followed by (Claude Code). Native installs update automatically in the background; Homebrew and WinGet installs need a manual brew upgrade or winget upgrade periodically.


Logging in

Claude Code needs an account — a Claude Pro, Max, Team, or Enterprise subscription, or a Claude Console (API) account. Start a session and you'll be prompted to log in on first use:

prompt
cd your-project
claude

Follow the browser prompt to authenticate. Your credentials are stored after that, so you won't need to log in again — /login inside a running session switches accounts or re-authenticates later if needed.


Your first session

With Claude Code running inside a project folder, start by asking it to explain what it's looking at rather than jumping straight to a task:

prompt
what does this project do?
prompt
explain the folder structure

Claude Code reads your files as needed — there's nothing to manually attach or upload. Once you have a feel for how it responds, try a small real edit:

prompt
add a hello world function to the main file

It will locate the right file, show you the proposed change, and — depending on your permission mode — ask for approval before actually writing it.


Permission modes

This is the setting that decides how much Claude Code does without checking with you first. Press Shift+Tab during a session to cycle through:

ModeBehaviour
defaultAsks for approval before every file change
acceptEditsAuto-approves file edits, so it moves faster once you trust the direction
planProposes a full approach without editing anything until you approve the plan

Starting a genuinely new or risky task in plan mode is worth the habit — you see the whole approach before anything touches your files, which matters most exactly when you're least sure what the right approach even is.


A complete first task, start to finish

This is the shape of real Claude Code usage — not a toy example, but the actual sequence for a small real fix.

1. Explore before changing anything:

prompt
analyze the database schema

2. Describe the task specifically. "Fix the bug" gives Claude Code nothing to aim at; a concrete symptom does:

prompt
there's a bug where users can submit the signup form with an empty
email field — fix it

Claude Code locates the relevant code, traces the cause, proposes a fix, and — in default permission mode — waits for your approval before editing.

3. Verify it, don't just trust it:

prompt
run the tests

4. Commit it:

prompt
commit my changes with a descriptive message

Claude Code writes commit messages, creates branches, and can open pull requests directly — Git operations are conversational, not a separate tool you switch to.


Essential commands

Run from your terminal, outside a session:

CommandWhat it does
claudeStart an interactive session
claude "task"Start a session with an initial prompt
claude -p "query"Run a one-off query, then exit
claude -cContinue the most recent conversation in this directory
claude -rResume a previous conversation

Run inside a running session:

CommandWhat it does
/clearClear conversation history
/helpShow available commands
/loginSwitch accounts or re-authenticate
/exitExit Claude Code

Customizing how it works

Two mechanisms cover most customization needs, and are worth knowing exist even before you need them:

CLAUDE.md — a Markdown file in your project root that Claude Code reads at the start of every session. Use it for coding standards, architecture decisions, and anything you'd otherwise have to repeat every time.

Skills — packaged, repeatable workflows that Claude applies automatically when a task matches, rather than you re-explaining the same instructions every time. If you have workflows you do the same way repeatedly — code review, writing commit messages, drafting a specific document type — see how Claude Skills work and how to install or write your own. Free skill libraries organised by profession, including for software engineers specifically, are available at chatgptprompt.in/skills.


Practical tips that actually change results

Be specific. "Fix the login bug" gives Claude Code nothing to aim at. "Fix the login bug where users see a blank screen after entering the wrong password" gives it an actual target.

Break big requests into steps. For anything with several moving parts, number them:

prompt
1. create a new database table for user profiles
2. create an API endpoint to get and update user profiles
3. build a page that lets users view and edit their profile

Let it explore before it edits. Asking Claude Code to understand your code first — "analyze the database schema," "explain how authentication currently works" — produces better changes than jumping straight to "fix this," because it isn't guessing at context it never had.


Ready to try these prompts?

Browse 70+ free copy-paste prompt templates — no sign-up required.

Share:
# End of article