How to use Claude Code: installation, first commands and setup

9 minutes

Claude Code is an Anthropic tool that runs in the terminal, in a code editor, in a desktop app, and in the browser: it reads a project’s files, edits them, runs commands, and connects to other tools. You give it a task in plain language, and it plans the steps itself and shows you the changes.

This article covers what you need to get started, how to install Claude Code, what to do in your first session, and which settings are worth knowing from day one.

What Claude Code is

The documentation describes Claude Code as an agentic tool: it reads a codebase, edits files, runs commands, and integrates with development tools. “Agentic” means Claude Code doesn’t just answer questions — it carries out actions on its own, within the permissions you’ve given it.

You can use it for more than just programming. Anything that boils down to working with files and commands under clear rules — going through documents, preparing tables and reports, repetitive file operations — can also be handed to Claude Code.

Claude Code is available in several forms: in the terminal, in extensions for VS Code and JetBrains IDEs, in a desktop app, and in the browser. Below, the focus is mainly on the terminal version — it has all the features available.

What you need to get started

  • Account. A Claude Pro, Max, Team or Enterprise subscription, or a Claude Console account; the free claude.ai plan doesn’t give access to Claude Code.
  • Operating system. macOS 13 or later, Windows 10 version 1809 or later or Windows Server 2019 or later, Ubuntu 20.04 or later, Debian 10 or later, Alpine Linux 3.19 or later.
  • Computer. At least 4 GB of RAM, an x64 or ARM64 processor.
  • Internet and country. You need an internet connection; Claude Code can be used in the countries Anthropic supports — the list is published on the company’s site.

How to install Claude Code

The recommended way is the official installer, which runs with a single command in the terminal.

macOS, Linux and WSL:

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

Windows, PowerShell:

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

Windows, Command Prompt (CMD):

curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

The installer doesn’t show download progress. When it finishes, open a new terminal window and check the installation with the claude --version command — it should print a version number. If something’s off, the claude doctor command will show diagnostics for the installation and settings.

An installation made through the official installer updates automatically in the background. There are other installation methods too — Homebrew, WinGet, Linux package managers — but those need to be updated manually.

Windows specifics

Claude Code works both directly on Windows and inside WSL. Administrator rights aren’t required for installation. The documentation recommends installing Git for Windows: with it, Claude Code runs commands through Git Bash; without it, through PowerShell.

If the install in PowerShell throws an error about &&, that means you ran the CMD command in PowerShell; if the error mentions irm, it’s the other way around — you ran the PowerShell command in CMD. In PowerShell, the prompt line starts with PS.

First run and sign-in

Open a terminal in the project folder and launch Claude Code:

cd path/to/your/folder
claude

The first time it runs, Claude Code will ask you to sign in: for a Claude subscription or a Console account, sign-in finishes in the browser. Your login is saved, so you don’t need to sign in again. You can switch accounts with the /login command inside a session.

Your first tasks

Start with questions about the folder you’re working in. Claude Code reads the files it needs on its own — you don’t need to add them manually. Example prompts:

  • “what’s in this folder, and how is it organized?”
  • “which files were changed most recently?”
  • “make a list of all the documents in the docs folder that have dates in their names”

Then try a small task that changes files. Claude Code will show you what it’s about to change, and ask for confirmation if needed.

The documentation recommends phrasing tasks specifically, breaking big tasks into steps, and letting Claude Code study the material first before changing anything. For example, instead of “fix the bug,” say “fix the bug that shows the user a blank screen after an incorrect password.”

How to phrase tasks for Claude Code

The quality of the result largely depends on how the task is phrased. A few rules that help from your very first sessions:

  • Describe the result, not just the action. Not “go through the documents,” but “make a table with ‘date’ and ‘amount’ columns, one row per document, and list the gaps separately.”
  • Specify which data to work with. Name the folder or files, and what shouldn’t be touched.
  • Break a big task into steps. The documentation recommends giving complex tasks step by step.
  • Ask for a plan first. In plan mode, Claude Code will study the material and propose a sequence of actions without changing any files.
  • Check the process, not just the outcome. Claude Code shows which files it’s reading and what it’s about to change — that’s the best way to catch a mistake early.
  • Lock in rules that work. If you find yourself repeating the same thing, move it into CLAUDE.md or a skill — more on those below.

Essential commands

CommandWhereWhat it does
claudeterminalStarts an interactive session
claude "task"terminalStarts a session with a task right away
claude -p "prompt"terminalRuns a one-off query and exits
claude -cterminalContinues the most recent conversation in the current folder
claude -rterminalResumes one of your past conversations
/helpin a sessionShows the available commands
/clearin a sessionClears the conversation history
/exitin a sessionExits

The table is based on the documentation’s “Essential commands” section. Type / in a session to see all commands and skills; the up arrow brings back past prompts.

Permission modes: what Claude Code does without asking

The permission mode determines which actions Claude Code takes without asking you. You can switch modes with Shift+Tab at any point in a session.

ModeWhat runs without confirmationWhen it fits
Manual (default)Reading onlyWhen you want to review every action
acceptEditsReading, editing files, and simple file commandsWorking on files you’re reviewing
planReading and studying the material without editing filesGetting familiar with the material before making changes
autoEverything, with background safety checksLong-running tasks
bypassPermissionsEverything, with no checksIsolated containers and virtual machines only

The mode descriptions follow the documentation. Note: in newer versions, an interactive terminal session starts in auto mode by default. For a newcomer, it’s sensible to switch to manual mode or plan: that way you can see exactly what Claude Code is about to do.

CLAUDE.md: standing instructions

Every Claude Code session starts with a clean context. To avoid repeating the same rules, you write them into a CLAUDE.md file at the project root — Claude Code loads it at the start of every session. Personal rules for all your projects can go in ~/.claude/CLAUDE.md.

The /init command creates a starter CLAUDE.md automatically: Claude Code studies the project and writes down the rules it finds, or suggests improvements if the file already exists. Write specific, checkable rules into CLAUDE.md: the documentation notes that Claude Code treats this file as context, not as a hard setting.

Skills, agents and MCP

  • Skills. A recurring procedure is written up in a SKILL.md file. Claude Code uses a skill when a task matches it, or on a command with the skill’s name; unlike CLAUDE.md, a skill’s content loads only when it’s used.
  • Agents (subagents). These are helpers for specific types of tasks, with their own instructions and tools. They’re described by files in a project’s .claude/agents/ folder. We covered how to build your own agent step by step in the article “How to build an AI agent”.
  • MCP. Through the open MCP protocol, Claude Code connects to external tools, databases and services; a server is added with the claude mcp add command, and connection status is checked with /mcp. Only connect servers you trust: the documentation warns about the risk of prompt-injection attacks.

Common problems

  • The claude command isn’t found. The install folder hasn’t made it into the PATH variable yet — the documentation has a separate guide on fixing this. First, just try opening a new terminal window.
  • An error during installation on Windows. Check which shell you’re in — PowerShell or CMD — and use the command for that one.
  • Claude Code won’t sign in. Make sure you have a suitable plan: the free claude.ai plan won’t work.
  • Not sure what’s broken. Run claude doctor — the command will show the state of the installation and any errors in the settings files.

Frequently asked questions

Is Claude Code free?

No. You need a Claude Pro, Max, Team or Enterprise subscription, or a Claude Console account; the free claude.ai plan doesn’t include Claude Code. Current pricing is on Anthropic’s site.

Can Claude Code be used without the terminal?

Yes, there’s a desktop app, extensions for VS Code and JetBrains, and a browser version. But basic terminal skills come in handy: it’s where all the features are available.

Do you need to know how to program to use Claude Code?

No. Tasks are given in plain language. It matters more to be able to describe the result precisely and check what comes out.

Can Claude Code be run automatically?

Yes: it can be run from scripts, on a schedule, and on triggers, and hooks let you run your own commands before or after Claude Code’s actions.

Sources

Documentation this article relies on (checked October 11, 2026):

You can learn Claude Code hands-on and build your first agent in the “My First AI Agent” workshop: five lessons from installation to a working agent on a training example. The workshop is launching soon — you can sign up in advance. → Learn about the workshop