Back to Guides
Builders

Claude Code for Beginners: Install, Sign In and Run Your First Task

14 min read


Most people meet Claude Code the way they meet any new tool: they open a terminal, feel lost, and fall back to pasting code into a chat window. That works, but it throws away the one thing that makes Claude Code different. It does not need you to paste anything.

In a chat, you carry your project to Claude. In Claude Code, Claude walks into your project.

This guide takes you from nothing installed to a finished first task. You will install it, sign in, ask questions about a real project, make one small change, and learn the handful of commands that cover most of your first week.

What Claude Code actually is

Claude Code is an assistant that runs in your terminal, in the folder of your project. When you give it a task, it works through a loop with three phases: it gathers context, takes action, and verifies the result. It repeats that loop until the task is done, and you can interrupt it at any point.

The difference from a chat is the tools. A chat can only answer with text. Claude Code can read your files, edit them, search the project, run commands such as your test suite, and use git. Each result feeds the next decision.

Say you ask it to fix the failing tests. It will typically run the tests to see what fails, read the error output, search for the files involved, read them, edit them, and run the tests again. You wrote one sentence. It did six steps.

Not only for programmers' code

Anything you can do from the command line, Claude Code can help with: writing documentation, running builds, searching files, researching a topic. Code is where it is strongest, but the folder it works in can hold any project.

If you are still deciding whether Claude Code is the right tool for what you are doing, read Claude Code vs Projects vs Chat first. This guide assumes you have decided.

Before you start

You need three things, and none of them is hard to get.

  • A terminal. On a Mac that is the Terminal app, on Windows it is PowerShell or CMD, on Linux it is whatever you already use.

  • A folder with a project in it. Anything works for a first session: a website, a script, a folder of documents. A real project teaches you more than an empty one.

  • A way to sign in: a Claude Pro, Max, Team or Enterprise subscription, a Claude Console account (API access with pre-paid credits), or access through a supported cloud provider.

Claude Code is not part of the free Claude plan, so one of those accounts is required. If you have never opened a terminal, the official terminal guide shows how to open one and paste a command. It takes about two minutes.

Step 1: Install Claude Code

There are several ways to install it. The native installer is the recommended one, because it updates itself in the background.

Your systemCommandUpdates itself?
macOS, Linux, WSLcurl -fsSL https://claude.ai/install.sh | bashYes
Windows PowerShellirm https://claude.ai/install.ps1 | iexYes
Windows CMDcurl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdYes
Homebrew (Mac)brew install --cask claude-codeNo, run brew upgrade claude-code
WinGet (Windows)winget install Anthropic.ClaudeCodeNo, run winget upgrade Anthropic.ClaudeCode

Pick the one that matches your system, paste it into the terminal and press Enter. The installer shows no progress while it downloads, so do not assume it froze.

PowerShell and CMD are not the same

If your prompt starts with PS C:\, you are in PowerShell. If it shows C:\ with no PS, you are in CMD. Pasting the CMD command into PowerShell gives the error The token '&&' is not a valid statement separator. Pasting the PowerShell command into CMD gives 'irm' is not recognized as an internal or external command. Either error just means you picked the wrong line.

On Linux you can also install with apt, dnf or apk on Debian, Fedora, RHEL and Alpine. On native Windows, Git for Windows is recommended so Claude Code can use the Bash tool. Without it, Claude Code uses PowerShell instead. If you use WSL, you do not need Git for Windows.

Check that it worked

When the installer finishes, open a new terminal window. This matters: the old window does not know about the new program yet. Then run the version command.

Terminal
$ claude --version2.1.283 (Claude Code)
Any version number followed by (Claude Code) means the install worked. Your number will be different.

If your shell says claude is not found or not recognized, the install folder is not on your PATH yet. Closing and reopening the terminal fixes it most of the time. If it does not, the official installation troubleshooting page matches each error message to a fix.

Step 2: Start your first session

Go to your project folder and type the name of the program.

Terminal
$ cd ~/projects/my-website$ claude
Replace the path with the folder of your own project.

The first time, Claude Code asks you to sign in. For a Claude subscription or Console account it opens your browser, you approve the sign-in there, and you are back in the terminal. Your credentials are stored, so you will not do this again.

You can sign in with any of these:

  • A Claude Pro, Max, Team or Enterprise account, which is the recommended route.
  • A Claude Console account. The first time you sign in, a "Claude Code" workspace is created automatically so you can track what it costs.
  • Amazon Bedrock, Google Cloud or Microsoft Foundry, for people whose company provides access that way.

If you have the ANTHROPIC_API_KEY environment variable set and approve the key when asked, Claude Code skips the sign-in step.

Once you are in, you see a prompt with the version, the current model and the folder you are working in. Type /help to list the commands, /resume to continue an older conversation, or /login later if you need to switch accounts.

Always start in the project folder

Claude Code treats the folder you launch it from as its working directory. Start it inside your project, not in your home folder, or it will have nothing relevant to read.

Step 3: Ask questions before you change anything

Your first prompts should not change anything. Questions are the safest way to see how Claude Code reads your project, and they teach you what it already knows.

Prompt
“what does this project do?”

Claude reads the files it needs and answers. You do not add files by hand, it finds them. Follow up with narrower questions, one at a time:

Prompt
“what technologies does this project use?”
Prompt
“where is the main entry point?”
Prompt
“explain the folder structure”
my-website
> what does this project do?Reading package.json, README.md, src/ ...This is a static marketing site built with Next.js. The pages live in src/app, shared components in src/components, and content in the content/ folder.
A session sketch. The exact wording and the files it reads will differ in your project.

You can also ask Claude Code about itself. Questions like "what can Claude Code do?" or "how do I create custom skills in Claude Code?" get real answers, because it knows its own documentation.

Inside Claude Tutorial

Asking before acting is a habit worth building

Getting the assistant to explain what it sees before you ask for changes is the same discipline the app teaches for every kind of work, not only code.

Coming Soon
Download on theApp Store
GET IT ONGoogle Play

Step 4: Make your first change

Now ask for something small and easy to undo.

Prompt
“add a hello world function to the main file”

Claude Code finds the right file and shows you the change it wants to make. Depending on your settings, it may ask for your approval first. If it does, read what it proposes and choose Yes.

That prompt is deliberately tiny. The point of this step is not the function. It is seeing the full cycle once: you ask, Claude finds the file, shows the edit, you approve, and the file changes.

What Claude Code can do without asking is controlled by the permission mode of the session. Press Shift+Tab at any time to cycle between modes. Newer versions start interactive terminal sessions in auto mode, where a background check blocks risky actions instead of asking you about every one, and older versions or other setups ask more often. Look at the status line to see which mode you are in. The next guide, Claude Code Permission Modes and Plan Mode, Explained, covers every mode and when to use each.

You can undo file edits

Before Claude edits a file, it saves a snapshot. If something goes wrong, press Esc twice to rewind, or just ask Claude to undo the change. Snapshots only cover files, not things like databases or deployments, and they work alongside git rather than replacing it.

Step 5: Use git by talking to it

If your project uses git, you can run it through conversation. These all work as written.

  1. 1

    See where you stand

    Ask what files have I changed? to get a plain summary of your working directory.

  2. 2

    Save your work

    Ask commit my changes with a descriptive message. Claude reads the diff and writes the message.

  3. 3

    Branch out

    Ask create a new branch called feature/quickstart before you start something bigger, so the main branch stays clean.

  4. 4

    Inspect history

    Ask show me the last 5 commits when you need to remember what happened recently.

Even when you trust it, read the commit message and the diff before you accept. You are the reviewer of everything Claude Code produces.

Step 6: Fix a bug or add a feature

Real tasks go better with real detail. Compare these two ways of asking for the same fix.

Instead ofTry
fix the bugfix the login bug where users see a blank screen after entering wrong credentials
add validationadd input validation to the user registration form, and show an error under the field that failed
make it fasterthe product list takes 4 seconds to load. Find out why and tell me before you change anything

The better versions name the symptom, the place and what done looks like. Claude Code can find files itself, so you do not have to list them, but it cannot read your mind about which problem you mean.

For bigger jobs, break the work into steps in a numbered list.

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 where a user can see and edit their profile
”

And when you do not know the codebase yet, let Claude explore first: ask it to analyze the database schema, or how the checkout works, before you ask it to change either. A few minutes of reading usually prevents a wrong change.

The commands you will use every day

You run some commands in your shell, before Claude Code starts, and others inside a session.

In your shellWhat it does
claudeStarts an interactive session
claude "fix the build error"Starts a session with a first prompt already typed
claude -p "explain this function"Answers one question and exits
claude -cContinues your most recent conversation in this folder
claude -rLets you pick a previous conversation to resume
Inside a sessionWhat it does
/helpLists the available commands
/clearClears the conversation history, a clean start for a new task
/resumeContinues a previous conversation
/exit or Ctrl+D twiceLeaves Claude Code

A few keys save a lot of time. Type / to see every command and skill you have. Press Tab to complete a command, ↑ to bring back earlier prompts, and Shift+Tab to cycle the permission mode. Press Esc to stop Claude immediately if it heads in the wrong direction.

When the first day goes wrong

These are the problems people hit most, and what each one means.

What you seeWhat it means and what to do
claude: command not foundThe install folder is not on your PATH yet. Open a new terminal window first. If it still fails, check the official installation troubleshooting page for your system.
syntax error near unexpected token '<' or a 403 during installThe download was blocked or redirected, often by a network or proxy. The troubleshooting page lists other install methods, such as Homebrew or WinGet.
It asks you to sign in every timeYou should only sign in once. Run /login inside the session and complete the browser step again, using the same account type each time.
It answers about the wrong projectYou launched it from the wrong folder. Leave with /exit, move to your project with cd, and start claude again.

When none of that fits, ask Claude Code itself. Type something like "how do I fix this error?" with the message pasted in. The /doctor command also runs a setup checkup that diagnoses installation and configuration problems.

You do not have to use the terminal

The terminal is the original home of Claude Code, and everything above applies there. The same assistant is also available as a desktop app, inside VS Code and JetBrains editors, on the web at claude.ai/code, in Slack, and in automated pipelines with GitHub Actions and GitLab. The interface changes how you see and talk to it. The loop of gathering context, acting and verifying is the same everywhere.

Frequently asked questions

Is Claude Code free?

No. It needs a Claude Pro, Max, Team or Enterprise subscription, a Claude Console account with API credits, or access through a supported cloud provider. The free Claude plan does not include it.

Do I need to know how to code to use Claude Code?

You need a project to point it at, and the more you understand the project, the better you can judge its work. You do not need to write the code yourself. Beginners get the most from the question-first habit in Step 3: ask Claude to explain before you ask it to change.

Is it safe to let it edit my files?

You control what it can do without asking through the permission mode, and file edits can be rewound with Esc twice. Treat its output like a colleague's pull request: read the diff before you commit. Keep your project in git so every change is easy to review or revert.

What is the difference between Claude Code and Claude in a chat?

A chat answers with text about what you paste in. Claude Code works inside your project: it reads the files itself, edits them, runs commands and checks its own work. Use the chat to think, use Claude Code to do.

Does Claude Code remember my project between sessions?

Each session starts with a fresh context. To carry knowledge across sessions you write it in a file called CLAUDE.md, and Claude Code also keeps notes of its own about your preferences. The next-but-one guide, CLAUDE.md Explained, shows how.

Your first-day checklist

  • claude --version prints a number in a fresh terminal window

  • You launched claude from inside your project folder and signed in

  • You asked at least three questions about the project before changing anything

  • You approved one small change, read the edit, and know that Esc twice rewinds file changes

  • You know where the status line shows the permission mode and how to cycle it with Shift+Tab

Continue reading