# macOS 27 弃用 hdiutil，diskutil 接棒

Original title: hdiutil is deprecated in macOS 27 Golden Gate

> Hacker News story 49402741 · language: zh · submitted 2026-08-22
> Web version: https://zeli.app/zh/story/49402741
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 188 · by [zdw](<https://news.ycombinator.com/user?id=zdw>) · 💬 86
[original](<https://lapcatsoftware.com/articles/2026/8/7.html>) · [HN discussion](<https://news.ycombinator.com/item?id=49402741>)

## Summary

在 macOS 27 Golden Gate 中，经典的命令行工具 hdiutil 已被正式弃用，苹果建议用户转向 diskutil image 进行所有磁盘镜像操作。我尝试用 diskutil 备份用户主目录时发现，虽然新工具速度更快、生成的镜像更小，但它缺乏 hdiutil 的自动认证机制，遇到 root 权限文件时会直接报错且无提示。此外，diskutil 默认会跳过临时文件和回收站，相当于自动开启了 scrub 模式，但日志输出却远不如 hdiutil 详细。苹果似乎执意打破长期工作流，这让依赖 hdiutil 的脚本和旧应用面临断裂风险，而新工具在错误处理和选项支持上显然还需打磨。

## Key quote

> 我不明白为什么需要弃用 hdiutil，毕竟同样的功能会在 diskutil 中继续存在。

## HN discussion (86 comments)

### [nrabulinski](<https://news.ycombinator.com/item?id=49403012>)

> 既然 xip 格式已经被弃用很久了，但 Xcode 至今仍然用这种格式分发，我严重怀疑 hdiutil 永远不会从 macOS 中消失。苹果只是不会再更新它了，就像他们没改过 xip 一样（虽然 hdiutil 本身也没啥大改动，但道理是一样的）。

### [oefrha](<https://news.ycombinator.com/item?id=49404656>)

> 真有意思，一家市值 4.5 万亿美元的公司，居然连每年维护这个工具所需的 100 个工程师工时都付不起，或者干脆花点 Claude 的 token 让 AI 搞定，一边却还在跟我们吹嘘 AI 如何提升他们的生产力（这点我得承认，AI 确实让我自己效率大增）。

### [binaryturtle](<https://news.ycombinator.com/item?id=49403828>)

> 那我猜 ram disk 也被弃用了？（据我所知，hdiutil 是创建 ram disk 的唯一途径）

### [stasomatic](<https://news.ycombinator.com/item?id=49404510>)

> 现在流行因为苹果的公司规模、影响力或市值而各种吐槽。确实挺烦人的。他们的桌面市场份额大概在 14% 左右。那剩下的 86% 过得就更好了吗？
>
> 我可能压根就没用过 hdutil。

### [jstsch](<https://news.ycombinator.com/item?id=49402987>)

> 这个错误能在 Console.app 里看到吗？这对那些把终端用法当作次要功能的 Cocoa/AppKit 应用来说，是个超级大的麻烦。

---

## Cite

- Page: https://zeli.app/zh/story/49402741
- Date: 2026-08-22
- Source: lapcatsoftware.com (https://lapcatsoftware.com/articles/2026/8/7.html)
- Hacker News: https://news.ycombinator.com/item?id=49402741

## Other languages

- en: https://zeli.app/story/49402741 · markdown: https://zeli.app/story/49402741.md
- ja: https://zeli.app/ja/story/49402741 · markdown: https://zeli.app/ja/story/49402741.md
- ko: https://zeli.app/ko/story/49402741 · markdown: https://zeli.app/ko/story/49402741.md
- de: https://zeli.app/de/story/49402741 · markdown: https://zeli.app/de/story/49402741.md
- es: https://zeli.app/es/story/49402741 · markdown: https://zeli.app/es/story/49402741.md
- ru: https://zeli.app/ru/story/49402741 · markdown: https://zeli.app/ru/story/49402741.md
