40>40>
41> **macOS, Linux, WSL:**41> **macOS, Linux, WSL:**
42>42>
43> ```bash theme={null}43> ```bash theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
44> curl -fsSL https://claude.ai/install.sh | bash44> curl -fsSL https://claude.ai/install.sh | bash
45> ```45> ```
46>46>
48>48>
49> **Windows PowerShell:**49> **Windows PowerShell:**
50>50>
51> ```powershell theme={null}51> ```powershell theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
52> irm https://claude.ai/install.ps1 | iex52> irm https://claude.ai/install.ps1 | iex
53> ```53> ```
54>54>
55> **Windows CMD:**55> **Windows CMD:**
56>56>
57> ```batch theme={null}57> ```batch theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
58> curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd58> curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
59> ```59> ```
60>60>
72 72
73> [tab] Homebrew73> [tab] Homebrew
74>74>
75> ```bash theme={null}75> ```bash theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
76> brew install --cask claude-code76> brew install --cask claude-code
77> ```77> ```
78>78>
84 84
85> [tab] WinGet85> [tab] WinGet
86>86>
87> ```powershell theme={null}87> ```powershell theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
88> winget install Anthropic.ClaudeCode88> winget install Anthropic.ClaudeCode
89> ```89> ```
90>90>
141 141
142### Alpine Linux e distribuições baseadas em musl142### Alpine Linux e distribuições baseadas em musl
143 143
144Instalar Claude Code no Alpine e outras distribuições baseadas em musl/uClibc requer `bash` e `curl` para o comando de instalação, e `libgcc`, `libstdc++` e `ripgrep` em tempo de execução. O Alpine não inclui `bash` ou `curl` por padrão, portanto o comando de instalação documentado falha com um erro `not found` até que você os instale. Instale esses pacotes usando o gerenciador de pacotes da sua distribuição e defina `USE_BUILTIN_RIPGREP=0`.144No Alpine e em outras distribuições baseadas em musl, o [comando de instalação](#install-claude-code) requer `bash` e `curl`, e o próprio Claude Code requer `bash` ou `zsh`. O Alpine não inclui `bash` ou `curl` por padrão, portanto o comando de instalação documentado falha com um erro `not found` até que você os instale.
145 145
146Este exemplo instala os pacotes necessários no Alpine:146Este exemplo instala os pacotes necessários no Alpine:
147 147
148```bash theme={null}148```bash theme={null}
149apk add bash curl libgcc libstdc++ ripgrep149apk add bash curl
150```
151
152No Alpine, `ripgrep` está no repositório community. Se `apk` relatar que o pacote está faltando, adicione o repositório community a `/etc/apk/repositories`, usando sua versão do Alpine:
153
154```bash theme={null}
155echo "https://dl-cdn.alpinelinux.org/alpine/v3.22/community" >> /etc/apk/repositories
156```
157
158Execute `apk update` para atualizar o índice de pacotes e tente novamente o comando `apk add`.
159
160Em seguida, defina `USE_BUILTIN_RIPGREP` como `0` em seu arquivo [`settings.json`](https://code.claude.com/docs/pt/settings-reference#all-settings):
161
162```json theme={null}
163{
164 "env": {
165 "USE_BUILTIN_RIPGREP": "0"
166 }
167}
168```150```
169 151
170## Verificar sua instalação152## Verificar sua instalação
443> wget -O /etc/apk/keys/claude-code.rsa.pub \425> wget -O /etc/apk/keys/claude-code.rsa.pub \
444> https://downloads.claude.ai/keys/claude-code.rsa.pub426> https://downloads.claude.ai/keys/claude-code.rsa.pub
445> echo "https://downloads.claude.ai/claude-code/apk/stable" >> /etc/apk/repositories427> echo "https://downloads.claude.ai/claude-code/apk/stable" >> /etc/apk/repositories
446> apk add claude-code428> apk add bash claude-code
447> ```429> ```
448>430>
449> Para mudar para o canal `latest`, remova a linha do repositório `stable` e adicione o repositório `latest`:431> Para mudar para o canal `latest`, remova a linha do repositório `stable` e adicione o repositório `latest`: