# How to install Claude Code and get started

> Install Claude Code on Mac, Windows or Linux, sign in, run your first session, and learn the commands and permission modes that matter.

Section: Guides
By: Ryan Cuff, https://ryancuff.com
Published: 2026-11-27
Updated: 2026-11-27
Source: https://agents.ryancuff.com/guides/how-to-install-claude-code

This is everything you need to go from nothing to a working Claude Code session. What you need first, the install command for your system, signing in, your first few prompts, and the handful of commands and settings worth knowing on day one. Every command here comes from the official docs.

## What you need before you install

A paid Claude plan or an API account. Claude Code comes with Pro, Max, Ultra, Team and Enterprise, or a Console account that pays for API usage. The free Claude plan doesn't include it.

You don't need Node.js. A lot of older guides say to install it first, but the recommended installer is a single program. Node only matters if you go the npm route.

It runs on macOS 13 or newer, Windows 10 version 1809 or newer, and most Linux, including Ubuntu 20.04 and up. You want 4 GB of RAM and an internet connection. On Windows you can run it natively or inside WSL 2, which is the Linux layer Windows ships with.

## How to install Claude Code

The native installer is the one the docs recommend. It also keeps itself updated. On a Mac, Linux, or inside WSL, paste this into a terminal.

macOS, Linux and WSL

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

On Windows, open PowerShell and run this one instead.

Windows PowerShell

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

If you're in the older Command Prompt, there's a version for that too. Running the PowerShell line in Command Prompt, or the other way around, is the most common way this goes wrong, so check which one you have open.

Windows Command Prompt

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

If you'd rather use a package manager, Homebrew and WinGet both work. The catch is they don't update on their own, so you have to upgrade it yourself now and then.

Homebrew or WinGet

```
brew install --cask claude-code
winget install Anthropic.ClaudeCode
```

npm still works too. Use Node 22 or newer and never run it with `sudo`.

npm

```
npm install -g @anthropic-ai/claude-code@latest
```

## Check that it worked

Open a new terminal window first. The installer adds Claude Code to your path, and a window that was already open won't see it. That one gets a lot of people, it just says command not found.

terminal

```
claude --version
```

You should get a version number back. If something seems off, `claude doctor` checks your install and settings without starting a session.

## Signing in the first time

Run `claude` and it opens your browser to log in. Sign in with your Claude account and you're done. If the browser shows a code instead, paste it back into the terminal where it asks. The docs recommend signing in with your subscription over using an API key.

Later, `/login` switches accounts or signs you back in.

## Your first session

Claude Code works on whatever folder you start it in. So go to a project first, then start it.

terminal

```
cd path-to-your-project
claude
```

Now just talk to it. The quickstart suggests starting with questions about the code, which is a good way to see how it reads a project before you let it change anything.

first prompts from the quickstart

```
what does this project do?
explain the folder structure
where is the main entry point?
add a hello world function to the main file
what files have I changed?
```

Then run `/init`. It looks through the project and writes a `CLAUDE.md` file, which gets loaded at the start of every session. It's where you put the stuff you'd otherwise repeat every time, like how to run the tests or what not to touch. I wrote more about that in [how AI agents remember things](https://agents.ryancuff.com/memory/how-ai-agents-remember-things).

## How permissions work

Claude Code can edit files and run commands, so it has permission modes that decide how much it does without asking. Press `Shift+Tab` to cycle through them. The status bar at the bottom shows which one you're in.

- Auto mode is where it starts. A second model checks each action before it runs, instead of asking you about every one. The docs are clear that this doesn't guarantee safety.
- Manual mode asks before edits, commands and network access.
- Accept edits mode lets it change files without asking but still checks before other commands.
- Plan mode lets it read and plan but not edit anything until you approve. More on how I use that in [plan first, then build](https://agents.ryancuff.com/workflows/plan-first-then-build).

Auto mode became the starting mode for everyone in version 2.1.283. Older guides say it asks before every action, and that's not true anymore.

## Commands worth knowing

Type `/` in a session to see them all. These are the ones worth learning first.

- `/help` lists what's available.
- `/clear` starts a fresh conversation. `/resume` brings an old one back.
- `/compact` summarizes a long conversation to free up room in the context window.
- `/context` shows how full the context window is.
- `/model` switches models.
- `/permissions` manages what it may do without asking.
- `/mcp` manages MCP servers, which give it extra tools.
- `/config` opens settings.

From the shell, `claude -c` picks up your last conversation in that folder, and `claude -p` asks one question, prints the answer and exits.

terminal

```
claude -c
claude -p "what does this project do?"
```

## Other ways to use it

You don't have to live in the terminal. There's a [VS Code extension](https://code.claude.com/docs/en/vs-code), a [JetBrains plugin](https://code.claude.com/docs/en/jetbrains) that needs the command line version installed too, a [desktop app](https://code.claude.com/docs/en/desktop-quickstart) that has it built in, and a [web version](https://code.claude.com/docs/en/web-quickstart).

## Updating and uninstalling

The native install updates itself in the background, and the new version kicks in the next time you start it. To update right away, run this.

terminal

```
claude update
```

To remove a native install on a Mac or Linux, delete these two. Your settings and history in `~/.claude` stay unless you delete that too.

terminal

```
rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claude
```

## Where to go next

The official docs are good. These are the pages worth reading next.

- [Quickstart](https://code.claude.com/docs/en/quickstart) walks through a first task end to end.
- [Common workflows](https://code.claude.com/docs/en/common-workflows) covers fixing bugs, refactoring and tests.
- [Best practices](https://code.claude.com/docs/en/best-practices) is the best single page to read after this.
- [Memory](https://code.claude.com/docs/en/memory) is how `CLAUDE.md` works.
- [Settings](https://code.claude.com/docs/en/settings) and [permissions](https://code.claude.com/docs/en/permissions) for setting it up the way you want.
- [Install troubleshooting](https://code.claude.com/docs/en/troubleshoot-install) if any of the above went sideways.

And on this site, once it's running, read about [what happens when it calls a tool](https://agents.ryancuff.com/how-ai-works/what-happens-when-an-agent-calls-a-tool), [subagents](https://agents.ryancuff.com/subagents/what-a-subagent-is-and-when-to-use-one), and [skill files](https://agents.ryancuff.com/skills/how-skill-files-work). That's roughly the order I figured them out in.
