reattach-to-user-namespace for Mac 版
将进程(例如 tmux)重新附加到后台
reattach-to-user-namespace 是什么
reattach-to-user-namespace 是一个针对 macOS 的小型包装程序,用来解决在 tmux 和未打补丁的 screen 下运行 pbpaste、pbcopy 等命令时无法正常访问系统剪贴板的问题。这类故障的根源在于 macOS 的私有 API 限制,而该仓库通过一个轻量 wrapper 绕开限制,让相关命令在新开的 shell 窗口中恢复可用。它适合仍在使用旧版 tmux 或 screen、又需要在终端里读写剪贴板的 macOS 用户。需要注意的是,tmux 2.6 及以后版本已内置同等功能,新版本用户可能无需再使用这个 wrapper。除剪贴板外,文档还提到其他一些程序也能从中受益。
如何安装 reattach-to-user-namespace
- 打开 终端(按 ⌘ + 空格,输入“终端”)。
- 如果还没安装 Homebrew,先运行下面这条安装命令。
- 运行下面这条命令:
最近 10 个版本记录
该项目暂未在 GitHub 发布 Release。
二进制包支持平台
Homebrew 官方提供的预编译包(bottle)覆盖:
- Apple 芯片 · 最新 macOS
- Apple 芯片 · macOS 26 Tahoe
- Apple 芯片 · macOS 15 Sequoia
- Apple 芯片 · macOS 14 Sonoma
- Apple 芯片 · macOS 13 Ventura
- arm64_monterey
- arm64_big_sur
- Intel · macOS 14 Sonoma
- Intel · macOS 13 Ventura
- Intel · macOS 12 Monterey
- big_sur
与同类应用对比
只对比公开元数据,不做主观推荐;需要逐项对比时见对比页。
| 应用 | 版本 | 许可证 | 架构 | 近 30 天安装 |
|---|---|---|---|---|
| reattach-to-user-namespace | 2.9 | BSD-2-Clause | 命令行 | 135 |
| ccmux | v1.4.6 | MIT | 命令行 | 120 |
| lazy-tmux | v0.3.6 | MIT | 命令行 | 95 |
| tpack | v2.0.7 | MIT | 命令行 | 101 |