2> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt2> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt
3> Use this file to discover all available pages before exploring further.3> Use this file to discover all available pages before exploring further.
4 4
5# Set up Claude Code5# Advanced setup
6 6
7> Install, authenticate, and start using Claude Code on your development machine.7> System requirements, platform-specific installation, version management, and uninstallation for Claude Code.
8
9This page covers system requirements, platform-specific installation details, updates, and uninstallation. For a guided walkthrough of your first session, see the [quickstart](/en/quickstart). If you've never used a terminal before, see the [terminal guide](/en/terminal-guide).
8 10
9## System requirements11## System requirements
10 12
11* **Operating System**:13Claude Code runs on the following platforms and configurations:
14
15* **Operating system**:
12 * macOS 13.0+16 * macOS 13.0+
13 * Windows 10 1809+ or Windows Server 2019+ ([see setup notes](#platform-specific-setup))17 * Windows 10 1809+ or Windows Server 2019+
14 * Ubuntu 20.04+18 * Ubuntu 20.04+
15 * Debian 10+19 * Debian 10+
16 * Alpine Linux 3.19+ ([additional dependencies required](#platform-specific-setup))20 * Alpine Linux 3.19+
17* **Hardware**: 4 GB+ RAM21* **Hardware**: 4 GB+ RAM
18* **Network**: Internet connection required (see [network configuration](/en/network-config#network-access-requirements))22* **Network**: internet connection required. See [network configuration](/en/network-config#network-access-requirements).
19* **Shell**: Works best in Bash or Zsh23* **Shell**: Bash, Zsh, PowerShell, or CMD. On Windows, [Git for Windows](https://git-scm.com/downloads/win) is required.
20* **Location**: [Anthropic supported countries](https://www.anthropic.com/supported-countries)24* **Location**: [Anthropic supported countries](https://www.anthropic.com/supported-countries)
21 25
22### Additional dependencies26### Additional dependencies
23 27
24* **ripgrep**: Usually included with Claude Code. If search fails, see [search troubleshooting](/en/troubleshooting#search-and-discovery-issues).28* **ripgrep**: usually included with Claude Code. If search fails, see [search troubleshooting](/en/troubleshooting#search-and-discovery-issues).
25* **[Node.js 18+](https://nodejs.org/en/download)**: Only required for [deprecated npm installation](#npm-installation-deprecated)29
30## Install Claude Code
26 31
27## Installation32<Tip>
33 Prefer a graphical interface? The [Desktop app](/en/desktop-quickstart) lets you use Claude Code without the terminal. Download it for [macOS](https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect?utm_source=claude_code\&utm_medium=docs) or [Windows](https://claude.ai/api/desktop/win32/x64/exe/latest/redirect?utm_source=claude_code\&utm_medium=docs).
34
35 New to the terminal? See the [terminal guide](/en/terminal-guide) for step-by-step instructions.
36</Tip>
28 37
29To install Claude Code, use one of the following methods:38To install Claude Code, use one of the following methods:
30 39
48 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd57 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
49 ```58 ```
50 59
60 **Windows requires [Git for Windows](https://git-scm.com/downloads/win).** Install it first if you don't have it.
61
51 <Info>62 <Info>
52 Native installations automatically update in the background to keep you on the latest version.63 Native installations automatically update in the background to keep you on the latest version.
53 </Info>64 </Info>
54 </Tab>65 </Tab>
55 66
56 <Tab title="Homebrew">67 <Tab title="Homebrew">
57 ```sh theme={null}68 ```bash theme={null}
58 brew install --cask claude-code69 brew install --cask claude-code
59 ```70 ```
60 71
74 </Tab>85 </Tab>
75</Tabs>86</Tabs>
76 87
77After the installation process completes, navigate to your project and start Claude Code:88After installation completes, open a terminal in the project you want to work in and start Claude Code:
78 89
79```bash theme={null}90```bash theme={null}
80cd your-awesome-project
81claude91claude
82```92```
83 93
84If you encounter any issues during installation, consult the [troubleshooting guide](/en/troubleshooting).94If you encounter any issues during installation, see the [troubleshooting guide](/en/troubleshooting).
85 95
86<Tip>96### Set up on Windows
87 Run `claude doctor` after installation to check your installation type and version.97
88</Tip>98Claude Code on Windows requires [Git for Windows](https://git-scm.com/downloads/win) or WSL. You can launch `claude` from PowerShell, CMD, or Git Bash. Claude Code uses Git Bash internally to run commands. You do not need to run PowerShell as Administrator.
89 99
90### Platform-specific setup100**Option 1: Native Windows with Git Bash**
91 101
92**Windows**: Run Claude Code natively (requires [Git Bash](https://git-scm.com/downloads/win)) or inside WSL. Both WSL 1 and WSL 2 are supported, but WSL 1 has limited support and does not support features like Bash tool sandboxing.102Install [Git for Windows](https://git-scm.com/downloads/win), then run the install command from PowerShell or CMD.
93 103
94**Alpine Linux and other musl/uClibc-based distributions**:104If Claude Code can't find your Git Bash installation, set the path in your [settings.json file](/en/settings):
105
106```json theme={null}
107{
108 "env": {
109 "CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
110 }
111}
112```
113
114**Option 2: WSL**
115
116Both WSL 1 and WSL 2 are supported. WSL 2 supports [sandboxing](/en/sandboxing) for enhanced security. WSL 1 does not support sandboxing.
117
118### Alpine Linux and musl-based distributions
95 119
96The native installer on Alpine and other musl/uClibc-based distributions requires `libgcc`, `libstdc++`, and `ripgrep`. Install these using your distribution's package manager, then set `USE_BUILTIN_RIPGREP=0`.120The native installer on Alpine and other musl/uClibc-based distributions requires `libgcc`, `libstdc++`, and `ripgrep`. Install these using your distribution's package manager, then set `USE_BUILTIN_RIPGREP=0`.
97 121
98On Alpine:122This example installs the required packages on Alpine:
99 123
100```bash theme={null}124```bash theme={null}
101apk add libgcc libstdc++ ripgrep125apk add libgcc libstdc++ ripgrep
102```126```
103 127
104### Authentication128Then set `USE_BUILTIN_RIPGREP` to `0` in your [settings.json file](/en/settings#environment-variables):
129
130```json theme={null}
131{
132 "env": {
133 "USE_BUILTIN_RIPGREP": "0"
134 }
135}
136```
137
138## Verify your installation
139
140After installing, confirm Claude Code is working:
141
142```bash theme={null}
143claude --version
144```
145
146For a more detailed check of your installation and configuration, run [`claude doctor`](/en/troubleshooting#get-more-help):
147
148```bash theme={null}
149claude doctor
150```
151
152## Authenticate
153
154Claude Code requires a Pro, Max, Teams, Enterprise, or Console account. The free Claude.ai plan does not include Claude Code access. You can also use Claude Code with a third-party API provider like [Amazon Bedrock](/en/amazon-bedrock), [Google Vertex AI](/en/google-vertex-ai), or [Microsoft Foundry](/en/microsoft-foundry).
155
156After installing, log in by running `claude` and following the browser prompts. See [Authentication](/en/authentication) for all account types and team setup options.
157
158## Update Claude Code
159
160Native installations automatically update in the background. You can [configure the release channel](#configure-release-channel) to control whether you receive updates immediately or on a delayed stable schedule, or [disable auto-updates](#disable-auto-updates) entirely. Homebrew and WinGet installations require manual updates.
161
162### Auto-updates
163
164Claude Code checks for updates on startup and periodically while running. Updates download and install in the background, then take effect the next time you start Claude Code.
165
166<Note>
167 Homebrew and WinGet installations do not auto-update. Use `brew upgrade claude-code` or `winget upgrade Anthropic.ClaudeCode` to update manually.
168
169 **Known issue:** Claude Code may notify you of updates before the new version is available in these package managers. If an upgrade fails, wait and try again later.
170
171 Homebrew keeps old versions on disk after upgrades. Run `brew cleanup claude-code` periodically to reclaim disk space.
172</Note>
173
174### Configure release channel
175
176Control which release channel Claude Code follows for auto-updates and `claude update` with the `autoUpdatesChannel` setting:
177
178* `"latest"`, the default: receive new features as soon as they're released
179* `"stable"`: use a version that is typically about one week old, skipping releases with major regressions
180
181Configure this via `/config` → **Auto-update channel**, or add it to your [settings.json file](/en/settings):
182
183```json theme={null}
184{
185 "autoUpdatesChannel": "stable"
186}
187```
188
189For enterprise deployments, you can enforce a consistent release channel across your organization using [managed settings](/en/permissions#managed-settings).
105 190
106#### For individuals191### Disable auto-updates
107 192
1081. **Claude Pro or Max plan** (recommended): Subscribe to Claude's [Pro or Max plan](https://claude.ai/pricing) for a unified subscription that includes both Claude Code and Claude on the web. Manage your account in one place and log in with your Claude.ai account.193Set `DISABLE_AUTOUPDATER` to `"1"` in the `env` key of your [settings.json file](/en/settings#environment-variables):
1092. **Claude Console**: Connect through the [Claude Console](https://console.anthropic.com) and complete the OAuth process. Requires active billing in the Anthropic Console. A "Claude Code" workspace is automatically created for usage tracking and cost management. You can't create API keys for the Claude Code workspace; it's dedicated exclusively for Claude Code usage.
110 194
111#### For teams and organizations195```json theme={null}
196{
197 "env": {
198 "DISABLE_AUTOUPDATER": "1"
199 }
200}
201```
202
203### Update manually
204
205To apply an update immediately without waiting for the next background check, run:
206
207```bash theme={null}
208claude update
209```
210
211## Advanced installation options
112 212
1131. **Claude for Teams or Enterprise** (recommended): Subscribe to [Claude for Teams](https://claude.com/pricing#team-&-enterprise) or [Claude for Enterprise](https://anthropic.com/contact-sales) for centralized billing, team management, and access to both Claude Code and Claude on the web. Team members log in with their Claude.ai accounts.213These options are for version pinning, migrating from npm, and verifying binary integrity.
1142. **Claude Console with team billing**: Set up a shared [Claude Console](https://console.anthropic.com) organization with team billing. Invite team members and assign roles for usage tracking.
1153. **Cloud providers**: Configure Claude Code to use [Amazon Bedrock, Google Vertex AI, or Microsoft Foundry](/en/third-party-integrations) for deployments with your existing cloud infrastructure.
116 214
117### Install a specific version215### Install a specific version
118 216
119The native installer accepts either a specific version number or a release channel (`latest` or `stable`). The channel you choose at install time becomes your default for auto-updates. See [Configure release channel](#configure-release-channel) for more information.217The native installer accepts either a specific version number or a release channel (`latest` or `stable`). The channel you choose at install time becomes your default for auto-updates. See [configure release channel](#configure-release-channel) for more information.
120 218
121To install the latest version (default):219To install the latest version (default):
122 220
184 </Tab>282 </Tab>
185</Tabs>283</Tabs>
186 284
187### Binary integrity and code signing285### Deprecated npm installation
188 286
189* SHA256 checksums for all platforms are published in the release manifests, currently located at `https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/{VERSION}/manifest.json` (example: replace `{VERSION}` with `2.0.30`)287npm installation is deprecated. The native installer is faster, requires no dependencies, and auto-updates in the background. Use the [native installation](#install-claude-code) method when possible.
190* Signed binaries are distributed for the following platforms:
191 * macOS: Signed by "Anthropic PBC" and notarized by Apple
192 * Windows: Signed by "Anthropic, PBC"
193 288
194## NPM installation (deprecated)289#### Migrate from npm to native
195 290
196NPM installation is deprecated. Use the [native installation](#installation) method when possible. To migrate an existing npm installation to native, run `claude install`.291If you previously installed Claude Code with npm, switch to the native installer:
197 292
198**Global npm installation**293```bash theme={null}
294# Install the native binary
295curl -fsSL https://claude.ai/install.sh | bash
199 296
200```sh theme={null}297# Remove the old npm installation
201npm install -g @anthropic-ai/claude-code298npm uninstall -g @anthropic-ai/claude-code
202```299```
203 300
204<Warning>301You can also run `claude install` from an existing npm installation to install the native binary alongside it, then remove the npm version.
205 Do NOT use `sudo npm install -g` as this can lead to permission issues and security risks.
206 If you encounter permission errors, see [troubleshooting permission errors](/en/troubleshooting#command-not-found-claude-or-permission-errors) for recommended solutions.
207</Warning>
208
209## Windows setup
210 302
211**Option 1: Claude Code within WSL**303#### Install with npm
212 304
213* Both WSL 1 and WSL 2 are supported305If you need npm installation for compatibility reasons, you must have [Node.js 18+](https://nodejs.org/en/download) installed. Install the package globally:
214* WSL 2 supports [sandboxing](/en/sandboxing) for enhanced security. WSL 1 does not support sandboxing.
215 306
216**Option 2: Claude Code on native Windows with Git Bash**307```bash theme={null}
217 308npm install -g @anthropic-ai/claude-code
218* Requires [Git for Windows](https://git-scm.com/downloads/win)
219* For portable Git installations, specify the path to your `bash.exe`:
220 ```powershell theme={null}
221 $env:CLAUDE_CODE_GIT_BASH_PATH="C:\Program Files\Git\bin\bash.exe"
222 ```
223
224## Update Claude Code
225
226### Auto updates
227
228Claude Code automatically keeps itself up to date to ensure you have the latest features and security fixes.
229
230* **Update checks**: Performed on startup and periodically while running
231* **Update process**: Downloads and installs automatically in the background
232* **Notifications**: You'll see a notification when updates are installed
233* **Applying updates**: Updates take effect the next time you start Claude Code
234
235<Note>
236 Homebrew and WinGet installations do not auto-update. Use `brew upgrade claude-code` or `winget upgrade Anthropic.ClaudeCode` to update manually.
237
238 **Known issue:** Claude Code may notify you of updates before the new version is available in these package managers. If an upgrade fails, wait and try again later.
239</Note>
240
241### Configure release channel
242
243Configure which release channel Claude Code follows for both auto-updates and `claude update` with the `autoUpdatesChannel` setting:
244
245* `"latest"` (default): Receive new features as soon as they're released
246* `"stable"`: Use a version that is typically about one week old, skipping releases with major regressions
247
248Configure this via `/config` → **Auto-update channel**, or add it to your [settings.json file](/en/settings):
249
250```json theme={null}
251{
252 "autoUpdatesChannel": "stable"
253}
254```309```
255 310
256For enterprise deployments, you can enforce a consistent release channel across your organization using [managed settings](/en/settings#settings-files).311<Warning>
257 312 Do NOT use `sudo npm install -g` as this can lead to permission issues and security risks. If you encounter permission errors, see [troubleshooting permission errors](/en/troubleshooting#permission-errors-during-installation).
258### Disable auto-updates313</Warning>
259
260Set the `DISABLE_AUTOUPDATER` environment variable in your shell or [settings.json file](/en/settings):
261 314
262```bash theme={null}315### Binary integrity and code signing
263export DISABLE_AUTOUPDATER=1
264```
265 316
266### Update manually317You can verify the integrity of Claude Code binaries using SHA256 checksums and code signatures.
267 318
268```bash theme={null}319* SHA256 checksums for all platforms are published in the release manifests at `https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/{VERSION}/manifest.json`. Replace `{VERSION}` with a version number such as `2.0.30`.
269claude update320* Signed binaries are distributed for the following platforms:
270```321 * **macOS**: signed by "Anthropic PBC" and notarized by Apple
322 * **Windows**: signed by "Anthropic, PBC"
271 323
272## Uninstall Claude Code324## Uninstall Claude Code
273 325
274If you need to uninstall Claude Code, follow the instructions for your installation method.326To remove Claude Code, follow the instructions for your installation method.
275 327
276### Native installation328### Native installation
277 329
278Remove the Claude Code binary and version files:330Remove the Claude Code binary and version files:
279 331
280**macOS, Linux, WSL:**332<Tabs>
281 333 <Tab title="macOS, Linux, WSL">
282```bash theme={null}334 ```bash theme={null}
283rm -f ~/.local/bin/claude335 rm -f ~/.local/bin/claude
284rm -rf ~/.local/share/claude336 rm -rf ~/.local/share/claude
285```337 ```
286 338 </Tab>
287**Windows PowerShell:**
288
289```powershell theme={null}
290Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force
291Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force
292```
293
294**Windows CMD:**
295 339
296```batch theme={null}340 <Tab title="Windows PowerShell">
297del "%USERPROFILE%\.local\bin\claude.exe"341 ```powershell theme={null}
298rmdir /s /q "%USERPROFILE%\.local\share\claude"342 Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force
299```343 Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force
344 ```
345 </Tab>
346</Tabs>
300 347
301### Homebrew installation348### Homebrew installation
302 349
350Remove the Homebrew cask:
351
303```bash theme={null}352```bash theme={null}
304brew uninstall --cask claude-code353brew uninstall --cask claude-code
305```354```
306 355
307### WinGet installation356### WinGet installation
308 357
358Remove the WinGet package:
359
309```powershell theme={null}360```powershell theme={null}
310winget uninstall Anthropic.ClaudeCode361winget uninstall Anthropic.ClaudeCode
311```362```
312 363
313### NPM installation364### npm
365
366Remove the global npm package:
314 367
315```bash theme={null}368```bash theme={null}
316npm uninstall -g @anthropic-ai/claude-code369npm uninstall -g @anthropic-ai/claude-code
317```370```
318 371
319### Clean up configuration files (optional)372### Remove configuration files
320 373
321<Warning>374<Warning>
322 Removing configuration files will delete all your settings, allowed tools, MCP server configurations, and session history.375 Removing configuration files will delete all your settings, allowed tools, MCP server configurations, and session history.
324 377
325To remove Claude Code settings and cached data:378To remove Claude Code settings and cached data:
326 379
327**macOS, Linux, WSL:**380<Tabs>
328 381 <Tab title="macOS, Linux, WSL">
329```bash theme={null}382 ```bash theme={null}
330# Remove user settings and state383 # Remove user settings and state
331rm -rf ~/.claude384 rm -rf ~/.claude
332rm ~/.claude.json385 rm ~/.claude.json
333
334# Remove project-specific settings (run from your project directory)
335rm -rf .claude
336rm -f .mcp.json
337```
338
339**Windows PowerShell:**
340
341```powershell theme={null}
342# Remove user settings and state
343Remove-Item -Path "$env:USERPROFILE\.claude" -Recurse -Force
344Remove-Item -Path "$env:USERPROFILE\.claude.json" -Force
345
346# Remove project-specific settings (run from your project directory)
347Remove-Item -Path ".claude" -Recurse -Force
348Remove-Item -Path ".mcp.json" -Force
349```
350 386
351**Windows CMD:**387 # Remove project-specific settings (run from your project directory)
388 rm -rf .claude
389 rm -f .mcp.json
390 ```
391 </Tab>
352 392
353```batch theme={null}393 <Tab title="Windows PowerShell">
354REM Remove user settings and state394 ```powershell theme={null}
355rmdir /s /q "%USERPROFILE%\.claude"395 # Remove user settings and state
356del "%USERPROFILE%\.claude.json"396 Remove-Item -Path "$env:USERPROFILE\.claude" -Recurse -Force
397 Remove-Item -Path "$env:USERPROFILE\.claude.json" -Force
357 398
358REM Remove project-specific settings (run from your project directory)399 # Remove project-specific settings (run from your project directory)
359rmdir /s /q ".claude"400 Remove-Item -Path ".claude" -Recurse -Force
360del ".mcp.json"401 Remove-Item -Path ".mcp.json" -Force
361```402 ```
403 </Tab>
404</Tabs>