# iTerm2

可配置的 Mac 终端，支持拆分窗格、配置文件、可搜索输出、shell 和 tmux 集成，以及可选的脚本和 AI 工具。

> 这是 OpenNavo 上 iTerm2 页面的 Markdown 版本，内容与网页相同： <https://opennavo.com/zh/apps/iterm2>

- **最新版本**: `3.7.9`
- **开发者**: George Nachman and contributors
- **主页**: <https://iterm2.com/>
- **分类**: [终端与 Shell](https://opennavo.com/zh/categories/terminal)
- **安装**: `brew install --cask iterm2`
- **近 30 天安装**: 27,089
- **Homebrew**: 可以安装，应用会自行更新
- **下载地址**: <https://iterm2.com/downloads/stable/iTerm2-3_7_9.zip>
- **SHA-256**: `beb96a1089b061c80e030101947aee13d54ba5e4058ad00b82e79633be29d3d2`

SHA-256 只用来核对下载的文件是否完整，不代表安全认证。

## 安装与卸载内容

```json
[
  {
    "declaration": {
      "uninstall": [
        {
          "quit": "com.googlecode.iterm2"
        }
      ]
    },
    "phase": "uninstall",
    "sources": [],
    "type": "uninstall"
  },
  {
    "declaration": {
      "app": [
        "iTerm.app"
      ],
      "target": "/Applications/iTerm.app"
    },
    "phase": "install",
    "sources": [
      "iTerm.app"
    ],
    "target": "/Applications/iTerm.app",
    "type": "app"
  },
  {
    "declaration": {
      "zap": [
        {
          "trash": [
            "~/Library/Application Scripts/com.googlecode.iterm2.iTermFileProvider",
            "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.googlecode.iterm2.itermai.sfl*",
            "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.googlecode.iterm2.sfl*",
            "~/Library/Application Support/iTerm",
            "~/Library/Application Support/iTerm2",
            "~/Library/Caches/com.googlecode.iterm2",
            "~/Library/Containers/com.googlecode.iterm2.iTermFileProvider",
            "~/Library/Containers/iTermAI",
            "~/Library/Cookies/com.googlecode.iterm2.binarycookies",
            "~/Library/HTTPStorages/com.googlecode.iterm2",
            "~/Library/HTTPStorages/com.googlecode.iterm2.binarycookies",
            "~/Library/Preferences/com.googlecode.iterm2.plist",
            "~/Library/Preferences/com.googlecode.iterm2.private.plist",
            "~/Library/Saved Application State/com.googlecode.iterm2*.savedState",
            "~/Library/WebKit/com.googlecode.iterm2"
          ]
        }
      ]
    },
    "phase": "cleanup",
    "sources": [],
    "type": "zap"
  }
]
```

## 介绍

iTerm2 是一款面向 macOS 的免费开源终端模拟器。它为本地 shell、SSH 会话、命令行开发和管理提供可配置的工作区，尤其适合管理大量会话的开发者与运维人员。

### 主要功能
- 在标签页以及水平或垂直拆分窗格中安排会话；为不同主机和任务自定义配置文件。
- 使用正则表达式搜索终端输出，并使用自动补全、粘贴历史、键盘复制模式和已保存的排列。
- 通过全局热键呼出专用终端，并快速查找会话。
- 使用 shell 集成跟踪命令和工作目录，并使用 tmux 集成将多路复用器会话呈现为原生窗口和窗格。
- 显示行内图像并自定义触发器和状态栏；通过可选的 Python API 自动化支持的操作。
- 通过 AI 插件和已配置的提供商启用可选的 AI 聊天与辅助功能，与基本终端操作分开。

### 安装与首次使用
安装 `brew install --cask iterm2`，然后从“应用程序”打开 iTerm.app。以你的 Mac 所配置的 shell 开始，并在“设置”中自定义配置文件、字体、键绑定和窗格。Shell 集成是可选的；请按照适用于你的 shell 的官方说明进行操作。iTerm2 是终端模拟器，因此在其内部执行的命令仍保留它们各自的安装和系统要求。

### 系统要求、依赖项与冲突
当前稳定版 3.7.x 需要 macOS Ventura 13 或更高版本，并支持 Apple Silicon 和 Intel Mac。iTerm2 是 macOS 桌面应用程序；不提供原生 Windows 或 Linux 主机版本。SSH 可以连接到其他系统，而无需将它们变为 iTerm2 主机。历史下载版本具有不同要求，且不是当前这个 cask。

Homebrew 声明了 macOS 最低要求，且没有额外的 formula 依赖。它明确与 `iterm2@beta` 和 `iterm2@nightly` 冲突，这两个包会安装同一应用的替代版本。Python 自动化需要配置好的脚本运行时，可通过 iTerm2 文档化的运行时设置获得。tmux 集成需要在相关环境中安装 tmux。AI 功能需要可选插件以及提供商的配置或凭据；自托管提供商有其自己的要求。这些附加功能不是基本 shell 会话的前提条件。

### 账户、费用与许可证
该应用可免费下载和使用；捐赠是可选的。基本终端使用不需要 iTerm2 账户或订阅。SSH 主机和集成可能需要它们自己的账户。远程 AI 提供商可能会对 API 使用收费，这与 iTerm2 分开。George Nachman 和贡献者在 GNU GPL 第 2 版下维护该项目；捆绑组件保留其适用的声明。

官方参考：[功能](https://iterm2.com/features.html)、[下载与更新日志](https://iterm2.com/downloads.html)、[文档](https://iterm2.com/documentation.html)、[AI 设置](https://iterm2.com/documentation-preferences-general.html) 和 [源代码与许可证](https://github.com/gnachman/iTerm2)。

## 系统要求

- macOS 13 起 · 应用版本: 3.7.9 · Intel · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/i/iterm2.rb> · 核查于 2026-11-23
  - <https://iterm2.com/downloads/stable/iTerm2-3_7_9.zip>
  - SHA-256: `beb96a1089b061c80e030101947aee13d54ba5e4058ad00b82e79633be29d3d2`
- macOS 13 起 · 应用版本: 3.7.9 · Apple 芯片 · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/i/iterm2.rb> · 核查于 2026-11-23
  - <https://iterm2.com/downloads/stable/iTerm2-3_7_9.zip>
  - SHA-256: `beb96a1089b061c80e030101947aee13d54ba5e4058ad00b82e79633be29d3d2`

## iTerm2 的安全事实

这里只列可以核验的事实，并注明来源和日期，不是安全认证。要检查你下载的文件，可以用 OpenNavo 在本机扫描。

- <https://github.com/gnachman/iTerm2> · 是否开源: 是 — <https://github.com/gnachman/iTerm2> · 核查于 2026-11-13

## 卸载

- `brew uninstall --cask iterm2`

普通卸载会删除应用本身，设置和缓存会保留。

### 深度清理（可选）

- `brew uninstall --zap --cask iterm2`

`--zap` 还会删除 Homebrew 定义里列出的设置、缓存等文件，其中可能有其他应用共用的数据，删除后无法恢复；它也不保证没有任何残留。请先备份需要保留的数据；如要保留设置和缓存，请不要加 `--zap`。

普通卸载会删除应用本身，设置和缓存会保留。

- 文件和文件夹: `~/Library/Application Scripts/com.googlecode.iterm2.iTermFileProvider` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/i/iterm2.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-23；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.googlecode.iterm2.itermai.sfl*` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/i/iterm2.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-23；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.googlecode.iterm2.sfl*` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/i/iterm2.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-23；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Application Support/iTerm` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/i/iterm2.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-23；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Application Support/iTerm2` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/i/iterm2.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-23；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Caches/com.googlecode.iterm2` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/i/iterm2.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-23；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Containers/com.googlecode.iterm2.iTermFileProvider` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/i/iterm2.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-23；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Containers/iTermAI` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/i/iterm2.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-23；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Cookies/com.googlecode.iterm2.binarycookies` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/i/iterm2.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-23；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/HTTPStorages/com.googlecode.iterm2` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/i/iterm2.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-23；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/HTTPStorages/com.googlecode.iterm2.binarycookies` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/i/iterm2.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-23；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Preferences/com.googlecode.iterm2.plist` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/i/iterm2.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-23；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Preferences/com.googlecode.iterm2.private.plist` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/i/iterm2.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-23；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/Saved Application State/com.googlecode.iterm2*.savedState` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/i/iterm2.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-23；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。
- 文件和文件夹: `~/Library/WebKit/com.googlecode.iterm2` — <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/i/iterm2.rb> · 以上条目来自 Homebrew 定义，核查于 2026-11-23；它们只说明定义声明会删除什么，不代表你的 Mac 上都有。

## 最新版本说明

### 3.7.9 (2026-11-20)

iTerm2 3.7.9 构建于 2026-11-20，是给在终端里查看文件的人的安全更新。

**安全**

- 用 cat 显示的特制文件可能运行命令。
- Kitty 图像和拖放回复被滥用。
- 回复不再包含可注入的控制字符。
- 标题报告也做了同样加固。

## 资料与来源

- <https://opennavo.com/zh/apps/iterm2>
- <https://opennavo.com/zh/apps/iterm2/versions>
- <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/i/iterm2.rb> · 核查于 2026-11-23
- <https://formulae.brew.sh/cask/iterm2>
- <https://github.com/gnachman/iTerm2> · 核查于 2026-11-13
