How to Set Up and Use Claude Code

Learn how to use Claude Code by installing the app or terminal tool, signing in, opening a project, and reviewing its changes.

Oct 20, 2026
•
11 min read

Contents

Don't Miss the Good Stuff

Get tech news that matters delivered to your inbox.

To use Claude Code, install the Claude desktop app or terminal tool, sign in with an eligible account, open your project folder, and describe your coding task. Review the changes, approve the actions you want it to take, and ask Claude to run the relevant checks.

For personal subscription access, you need Claude Pro or Max; the Free plan does not include Claude Code. Eligible Team and Enterprise accounts also have access. Choose the desktop app for a graphical interface or the terminal version to work from your project directory.

The short version

  • Choose your interface: Use the desktop app, terminal, supported editor extension, browser, or mobile app.
  • Sign in: Personal Pro and Max subscriptions include Claude Code access, while API usage has separate billing.
  • Give a specific task: Name the outcome you want and supply relevant files or error messages.
  • Review the result: Inspect changes and ask Claude to run the relevant checks.

RouteWhere you workWhat to prepare
Desktop appGraphical local sessionClaude app, eligible account, and project folder
TerminalCommand line in your projectClaude Code CLI and supported authentication
Editor extensionVS Code or a compatible editorClaude Code extension and supported authentication
BrowserCloud sessionEligible account and GitHub repository connection
Mobile appCloud or remotely controlled sessionClaude app and the same eligible account and organization

Start with the Claude desktop app

Download Claude from the official download page, choose the application for your operating system, and install it. Sign in with your Pro, Max, or eligible Team or Enterprise account, then open Code. Desktop Code supports macOS, Windows, and the Linux desktop beta.

Choose a Local environment, then use the project folder control to open your project folder. Choose a model, enter your task, and send it. Use the diff indicator to review the edits Claude makes.

On Linux, the desktop beta supports Ubuntu 22.04 or later and Debian 12 or later on x64 or ARM64 systems. The download page’s Linux entry links to Anthropic’s Linux setup guide, which installs the claude-desktop package from Anthropic’s apt repository or from a .deb file downloaded from that repository. Open a downloaded .deb in your software installer, such as GNOME Software, or install it with apt. Launch Claude after installation and open Code.

Install the terminal version

Install the CLI if you want to start Claude Code from your project directory in a terminal. On macOS 13 or later, or a supported Linux distribution, you need an x64 or ARM64 system. Open Terminal and run the native installer:

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

On Windows, the native installer supports Windows 10 version 1809 or later on compatible x64 or ARM64 systems. Press Win + X, select Terminal or Windows PowerShell, and run this command in PowerShell:

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

After installation, open a new terminal window. Check the installed version with this command before signing in:

claude --version

For a WSL installation, open your WSL distribution and run the macOS and Linux installer command inside that Linux terminal. Claude Code supports WSL 1 and WSL 2, although shell sandboxing requires WSL 2. Anthropic labels npm installation deprecated, so choose a native installer for a new setup.

Sign in and open your project

In your terminal, change to your project directory, replacing the example path with your folder. Then start Claude Code with the second command:

cd /path/to/project
claude

Choose your Claude subscription account and complete the browser sign-in. If an existing installation needs a different login, enter this command inside Claude Code:

/login

After signing in, check which account and configuration the session is using. Enter the status command inside Claude Code:

/status

If you want to use an existing Anthropic API key instead, set it in the environment that launches the CLI or compatible editor integration. API usage is billed separately from your Claude subscription. In Bash or Zsh, replace YOUR_KEY with your key, then launch Claude Code:

export ANTHROPIC_API_KEY=YOUR_KEY

claude

Set up an editor or cloud session

In VS Code 1.94 or later, Cursor, or a supported compatible editor, open Extensions with Cmd + Shift + X on Mac or Ctrl + Shift + X on Windows or Linux. Search for Claude Code and select Install. Open the Command Palette, search for Claude Code, select Open in New Tab, and sign in. Enter your coding task in the tab.

You can also use a separately installed CLI from your editor’s integrated terminal. Open that terminal in your project folder and run:

claude

For browser work, open Claude Code on the web and sign in with your Pro, Max, Team, or eligible Enterprise account. Your organization may need to enable access. Select Sign in with GitHub and complete GitHub sign-in, then install the Claude GitHub App if you need access to private repositories.

Select a repository, branch, environment, and permission mode, then describe the task and press Enter. Review the resulting diff and create a pull request when the work is ready. This work runs in a cloud session.

On iPhone, iPad, or Android, install Claude using the mobile options on the official download page and sign in with the same eligible account and organization. Tap Code, select a cloud repository and branch, and submit your task, or open an existing session. Mobile Code controls cloud or remotely controlled sessions; the code does not run on your phone.

Give Claude a clear first task

Describe a specific outcome, such as explaining the project, fixing a named bug, adding a feature, or writing tests. For an unfamiliar project, start by asking Claude to explain its structure. When reporting a bug, paste the relevant error message or logs.

Reference a particular file with @path/to/file in your prompt. In supported graphical interfaces, use attachments or drag supported files into the prompt. Attachment options vary by interface.

To include another working folder in a terminal session, use the add-directory command. Replace PATH with the additional folder:

/add-dir PATH

For a longer terminal prompt, press Ctrl + J to add a new line. Press Esc to interrupt Claude when you need to stop the current response or redirect the task. Then describe what you want it to do next.

Choose permissions and review changes

Use Plan mode when you want Claude to plan the task before editing. In the CLI, enter:

/plan

In the terminal, press Shift + Tab to cycle through available permission modes. Graphical interfaces provide a permission-mode selector that can offer Manual, Accept edits, Plan, or Auto. Available modes depend on the interface, and Auto also depends on the model and organizational policy.

At a local CLI approval prompt, select Yes to approve that action or No to decline it. To inspect or change the CLI’s Allow, Ask, and Deny rules, run:

/permissions

Review the edits through the graphical diff in your interface. In the terminal, inspect changes with:

/diff

Ask Claude to run the relevant checks, then review the results alongside the edits. For a desktop session with a supported local development server, ask Claude to run your app’s development server. Inspect the app in the Browser pane.

To return to an earlier checkpoint in a checkpoint-capable session, run the command below, select the earlier message, and choose the offered restore operation. Checkpoints do not generally restore shell-command changes or changes made outside Claude Code.

/rewind

Save project instructions and resume work

For instructions you want Claude to retain for a local project, generate a starting CLAUDE.md file. Run this command, then edit the file to describe the project rules Claude should follow:

/init

Use a project CLAUDE.md for shared project instructions or ~/.claude/CLAUDE.md for personal rules. To inspect instructions and toggle auto memory, enter:

/memory

When returning to local work, you can continue your most recent conversation. Run this from the terminal command line:

claude -c

To choose a local conversation instead, run the command below. Within an active session, use /resume to open session history or /branch to explore another direction while preserving the original conversation.

claude -r

Manage usage and update the CLI

You can inspect costs, limits, and activity from the CLI, with the billing information depending on how you authenticated. Enter:

/usage

For a long conversation, use /context to inspect context use and /compact to summarize the current conversation. Use /clear to start a new conversation.

On a consumer account, you can control whether coding sessions help improve models. Open your account menu, then select Settings > Privacy; under Help Improve our AI models, turn the toggle off to disable that option. You can change this through desktop, browser, or mobile account settings.

Native CLI installations update automatically unless update settings or administrative policy prevent it. To check for an update immediately, run:

claude update

Frequently Asked Questions

Can you control a local Claude Code session from your phone?

With an eligible Pro, Max, Team, or Enterprise account, enter /remote-control in an existing local session and select Enable Remote Control. Open the displayed URL or scan its QR code using the same Claude account. Your computer must remain running.

Can you dictate prompts instead of typing them?

In a local macOS, Linux, Windows, or WSLg terminal session with a microphone and claude.ai authentication, enter /voice hold. Hold Space, speak your prompt, release Space, then press Enter. This dictation feature is unavailable through API keys, SSH, or cloud sessions.

Can Claude Code run a single request without an interactive conversation?

Run claude -p "YOUR TASK" for a noninteractive request. You can also pipe text into it, such as cat error.log | claude -p "Explain these errors". Configure permission options for any tools the job needs.

What happens when you reach your subscription limit?

On Pro, Max 5x, or Max 20x, you can enable usage credits on the web by opening Settings > Usage and finding the Usage credits section. Select Enable, configure payment, and use Adjust limit to set a spending cap. Select Add funds, enter an amount, then select Purchase. Mobile-store subscribers must configure credits on the web.

Does uninstalling Claude Code cancel your subscription?

Removing the application or terminal package does not automatically cancel your subscription. Saved local configuration and history are also separate from the installed application.

Share