installation guide getting-started

Claude Code 安装指南(2026)

面向开发者的 Claude Code 安装与验证流程,覆盖 macOS、Windows、Linux。

Updated: February 1, 2026 Reviewed: 2/20/2026 8 min read

Quick Answer

推荐使用官方安装脚本,安装后立即执行 claude --version 与 claude doctor 做健康检查。

推荐安装方式

macOS 与 Linux 建议使用官方脚本安装,升级链路更稳定,也更容易对齐官方文档。

Windows 建议使用 PowerShell 官方命令,企业环境优先在 WSL 中运行。

安装后必须做的两件事

第一步是确认版本:`claude --version`,确保命令可执行。

第二步是运行 `claude doctor`,排查 PATH、网络、授权三类常见问题。

常见误区

不建议继续使用过时的安装方式混用多个渠道,否则容易出现版本漂移。

遇到权限问题优先修复环境,不要用不安全的全局提权方案。

Not working?

Check common errors and instant fixes in the Error Fix Center.

Fix Errors →

Official sources