6 6
7* **Operating Systems**: macOS 10.15+, Ubuntu 20.04+/Debian 10+, or Windows 10+ (with WSL 1, WSL 2, or Git for Windows)7* **Operating Systems**: macOS 10.15+, Ubuntu 20.04+/Debian 10+, or Windows 10+ (with WSL 1, WSL 2, or Git for Windows)
8* **Hardware**: 4GB+ RAM8* **Hardware**: 4GB+ RAM
9* **Software**: [Node.js 18+](https://nodejs.org/en/download)9* **Software**: [Node.js 18+](https://nodejs.org/en/download) (only required for NPM installation)
10* **Network**: Internet connection required for authentication and AI processing10* **Network**: Internet connection required for authentication and AI processing
11* **Shell**: Works best in Bash, Zsh or Fish11* **Shell**: Works best in Bash, Zsh or Fish
12* **Location**: [Anthropic supported countries](https://www.anthropic.com/supported-countries)12* **Location**: [Anthropic supported countries](https://www.anthropic.com/supported-countries)
17 17
18## Standard installation18## Standard installation
19 19
20To install Claude Code, run the following command:20To install Claude Code, use one of the following methods:
21 21
22```sh theme={null}22<Tabs>
23npm install -g @anthropic-ai/claude-code23 <Tab title="Native Install (Recommended)">
24```24 **Homebrew (macOS, Linux):**
25 25
26<Warning>26 ```sh theme={null}
27 Do NOT use `sudo npm install -g` as this can lead to permission issues and security risks.27 brew install --cask claude-code
28 If you encounter permission errors, see [configure Claude Code](/en/docs/claude-code/troubleshooting#linux-permission-issues) for recommended solutions.28 ```
29</Warning>29
30 **macOS, Linux, WSL:**
31
32 ```bash theme={null}
33 curl -fsSL https://claude.ai/install.sh | bash
34 ```
35
36 **Windows PowerShell:**
37
38 ```powershell theme={null}
39 irm https://claude.ai/install.ps1 | iex
40 ```
41
42 **Windows CMD:**
43
44 ```batch theme={null}
45 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
46 ```
47 </Tab>
48
49 <Tab title="NPM">
50 If you have [Node.js 18 or newer installed](https://nodejs.org/en/download/):
51
52 ```sh theme={null}
53 npm install -g @anthropic-ai/claude-code
54 ```
55 </Tab>
56</Tabs>
30 57
31<Note>58<Note>
32 Some users may be automatically migrated to an improved installation method.59 Some users may be automatically migrated to an improved installation method.
33 Run `claude doctor` after installation to check your installation type.
34</Note>60</Note>
35 61
36After the installation process completes, navigate to your project and start Claude Code:62After the installation process completes, navigate to your project and start Claude Code:
74 Run `claude doctor` after installation to check your installation type and version.100 Run `claude doctor` after installation to check your installation type and version.
75</Tip>101</Tip>
76 102
77### Global npm installation103### Native installation options
78 104
79Traditional method shown in the [install steps above](#standard-installation)105The native installation is the recommended method and offers several benefits:
80 106
81### Native binary installation (Beta)107* One self-contained executable
108* No Node.js dependency
109* Improved auto-updater stability
82 110
83If you have an existing installation of Claude Code, use `claude install` to start the native binary installation.111If you have an existing installation of Claude Code, use `claude install` to migrate to the native binary installation.
84 112
85For a fresh install, run one of the following commands:113For advanced installation options with the native installer:
86
87**Homebrew (macOS, Linux):**
88
89```sh theme={null}
90brew install --cask claude-code
91```
92
93<Note>
94 Claude Code installed via Homebrew will auto-update outside of the brew directory unless explicitly disabled with the `DISABLE_AUTOUPDATER` environment variable (see [Auto updates](#auto-updates) section).
95</Note>
96 114
97**macOS, Linux, WSL:**115**macOS, Linux, WSL:**
98 116
111 **Alpine Linux and other musl/uClibc-based distributions**: The native build requires you to install `libgcc`, `libstdc++`, and `ripgrep`. Install (Alpine: `apk add libgcc libstdc++ ripgrep`) and set `USE_BUILTIN_RIPGREP=0`.129 **Alpine Linux and other musl/uClibc-based distributions**: The native build requires you to install `libgcc`, `libstdc++`, and `ripgrep`. Install (Alpine: `apk add libgcc libstdc++ ripgrep`) and set `USE_BUILTIN_RIPGREP=0`.
112</Note>130</Note>
113 131
132<Note>
133 Claude Code installed via Homebrew will auto-update outside of the brew directory unless explicitly disabled with the `DISABLE_AUTOUPDATER` environment variable (see [Auto updates](#auto-updates) section).
134</Note>
135
114**Windows PowerShell:**136**Windows PowerShell:**
115 137
116```powershell theme={null}138```powershell theme={null}
137curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd 1.0.58 && del install.cmd159curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd 1.0.58 && del install.cmd
138```160```
139 161
140The native Claude Code installer is supported on macOS, Linux, and Windows.
141
142<Tip>162<Tip>
143 Make sure that you remove any outdated aliases or symlinks.163 Make sure that you remove any outdated aliases or symlinks before installing.
144 Once your installation is complete, run `claude doctor` to verify the installation.
145</Tip>164</Tip>
146 165
166### NPM installation
167
168For environments where NPM is preferred or required:
169
170```sh theme={null}
171npm install -g @anthropic-ai/claude-code
172```
173
174<Warning>
175 Do NOT use `sudo npm install -g` as this can lead to permission issues and security risks.
176 If you encounter permission errors, see [configure Claude Code](/en/docs/claude-code/troubleshooting#linux-permission-issues) for recommended solutions.
177</Warning>
178
147### Local installation179### Local installation
148 180
149* After global install via npm, use `claude migrate-installer` to move to local181* After global install via npm, use `claude migrate-installer` to move to local