分享
安装与环境配置
输入“/”快速插入内容
安装与环境配置
用户1208
用户1208
5月29日修改
用时
:15 分钟 |
难度
:⭐ 入门
目标
在你的系统上安装并运行 Claude Code,用第一条命令验证它能正常工作。
你将学到
•
在你的平台上安装 Claude Code(macOS / Linux / Windows)
•
理解基本的提示词 → 响应循环
•
运行第一条命令
•
访问帮助系统
安装
macOS(推荐)
代码块
Bash
brew install anthropic/tap/claude-code
验证:
代码块
Bash
claude --version
Linux
代码块
Bash
curl -sSL https://dl.claudecode.com/install.sh | bash
验证:
代码块
Bash
claude --version
Windows
从
https://dl.claudecode.com/windows
下载安装包,或使用:
代码块
PowerShell
iex ((New-Object System.Net.WebClient).DownloadString('https://dl.claudecode.com/install.ps1'))
Docker(任意平台)
代码块
Bash
docker run -it anthropic/claude-code:latest
首次运行
进入任意项目目录并启动 Claude:
代码块
Bash
cd ~/my-project
claude
你将看到:
代码块
Plain Text
Claude Code v2.x.x ready
Project: ~/my-project (git: main)
Context: 0% · Tokens available: 200,000
Type /help for commands or ask me anything
>
核心命令
命令
用途
/help
显示所有可用命令