安装与环境

cursor.com/downloads 安装桌面版,登录,打开一个文件夹。系统要求与包格式以官方 Quickstart 为准。


系统要求

平台要求安装包
WindowsWindows 10 及更新原生 .exe
macOSmacOS 12(Monterey)及更新原生 .dmg(Apple Silicon 与 Intel)
Linux官方推荐发行版包apt / yum(dnf)优先,AppImage 仅作便携备选

Linux 的 apt / yum 包带桌面图标、自动更新和 CLI 工具;AppImage 没有这些便利。


Windows

  1. 打开 cursor.com/downloads,下载 Windows 安装程序。
  2. 运行 .exe,按向导完成安装。
  3. 从开始菜单启动 Cursor

首次启动常见两步:

  1. 导入 VS Code:若本机已装 VS Code,按提示导入设置、快捷键与扩展(可跳过)。
  2. 登录:用官方支持的账号方式登录(浏览器回调)。登录后才能用 Agent 与付费模型额度。

用 PowerShell 确认可执行文件是否在 PATH(安装器有时会注册 cursor):

Get-Command cursor -ErrorAction SilentlyContinue

若找不到,打开命令面板(Ctrl+Shift+P),搜索 Shell Command: Install 'cursor' command in PATH(文案以你当前版本为准),装好后再开一个终端。

打开文件夹:

cursor .

macOS

  1. 下载 .dmg,把 Cursor 拖进 应用程序
  2. 首次打开若被 Gatekeeper 拦截,在「系统设置 → 隐私与安全性」里允许。
  3. 登录,并按提示导入 VS Code(可选)。

cursor 装进 PATH:命令面板 → Shell Command: Install 'cursor' command in PATH

cursor .

Linux(推荐仓库,而不是 AppImage)

Debian / Ubuntu(官方 Quickstart):

# 添加 Cursor 的 GPG 密钥
curl -fsSL https://downloads.cursor.com/keys/anysphere.asc | gpg --dearmor | sudo tee /etc/apt/keyrings/cursor.gpg > /dev/null

# 添加软件源
echo "deb [arch=amd64,arm64 signed-by=/etc/apt/keyrings/cursor.gpg] https://downloads.cursor.com/aptrepo stable main" | sudo tee /etc/apt/sources.list.d/cursor.list > /dev/null

sudo apt update
sudo apt install cursor

RHEL / Fedora:

sudo tee /etc/yum.repos.d/cursor.repo << 'EOF'
[cursor]
name=Cursor
baseurl=https://downloads.cursor.com/yumrepo
enabled=1
gpgcheck=1
gpgkey=https://downloads.cursor.com/keys/anysphere.asc
EOF

sudo dnf install cursor

AppImage(便携,官方不优先):

chmod +x Cursor-*.AppImage
./Cursor-*.AppImage

命令与密钥 URL 若与页面不一致,以 Quickstart 为准。


打开项目

登录后:File → Open Folder(或 cursor <路径>),选一个 Git 仓库根目录,不要只开单个文件。Agent 的搜索、规则与 .cursor/ 都以工作区根为准。

建议第一次用本机已有、能跑测试的小仓库,而不是空文件夹。


两种命令行(不要混)

命令是什么典型用途
cursor桌面编辑器的 shell 命令cursor . 用 GUI 打开当前目录
agentCursor CLI终端里跑 Agent;脚本 / CI 可用 -p

安装 Agent CLI(与桌面安装包分开):

# macOS / Linux / WSL
curl https://cursor.com/install -fsS | bash
# Windows PowerShell
irm 'https://cursor.com/install?win32=true' | iex

然后:

agent
# 或带初始任务
agent "Explain this repository in 10 bullets"

本教程后文默认你在 桌面 AgentCtrl+I / Cmd+I)。CLI 模式(Agent / Plan / Ask)与编辑器对齐,见官方 Using Agent in CLI


终端配置(Agent 会跑命令)

Agent 默认使用「第一个可用的终端 profile」。若 Windows 上它进了旧版 PowerShell 5.1,而你日常用 PowerShell 7:

  1. Ctrl+Shift+P
  2. Terminal: Select Default Profile
  3. PowerShellpwsh)或你的日常 shell

验证:

$PSVersionTable.PSVersion

常见问题

登录成功但 Agent 不可用?
检查网络、代理与套餐;企业账号可能被管理员关掉部分模型。

导入 VS Code 后快捷键乱了?
Cursor 自有绑定(如 Ctrl+I 开 Agent、Ctrl+K 行内编辑)可能与旧快捷键冲突。在 Keyboard Shortcuts 里搜功能名重绑。

Linux 装完没有 cursor
确认用的是 apt/yum 包而不是裸 AppImage;必要时注销重登以刷新 PATH。

只想先看文档?
可以先读 快速上手 的提示词,装好后再原样发给 Agent。


下一步

评论