修改 Mac 截图保存位置

让 macOS 截图自动保存到你指定的文件夹,而不是桌面。

macOS截图终端defaults 偏好设置中风险
运行下面的命令并把路径改成目标文件夹,之后的新截图会立即保存到那里,无需注销。

01命令

命令
$ defaults write com.apple.screencapture location ~/Pictures/Screenshots && killall SystemUIServer

02作用说明

macOS 从 com.apple.screencapture 的 location 偏好读取截图默认保存位置。写入该键即可改变目标目录,killall SystemUIServer 让设置立刻生效。目标文件夹必须已存在,可先用 mkdir -p 创建。想恢复默认的桌面保存位置,删除该键即可。

03风险

风险中风险
使用条件None; ~/Pictures/Screenshots must exist (mkdir -p ~/Pictures/Screenshots first if needed).
系统兼容性macOS 10.11 El Capitan – 15 Sequoia
!注意: 如果之后移动或删除了该文件夹,截图可能静默失败,需重置此偏好。

04撤销

撤销
$ defaults delete com.apple.screencapture location && killall SystemUIServer

05来源

  • macOS screencapture command reference
    SS64 · technical · 2026-09-16
    依据: Screenshot preferences live under com.apple.screencapture; the location key sets the default save folder and SystemUIServer picks it up.
  • macOS defaults command reference
    SS64 · technical · 2026-09-16
    依据: defaults write stores a user preference key; defaults delete removes it to restore the default value.

最后验证: 2026-09-16 · 分类: 系统与设置

06相关方案