修改截图的默认保存格式
用 defaults 让以后所有截图自动存为 JPG 等格式。
运行 `defaults write com.apple.screencapture type jpg && killall SystemUIServer` 即可切换为 JPG。
01命令
命令
$ defaults write com.apple.screencapture type jpg && killall SystemUIServer02作用说明
PNG 截图无损但体积大,日常分享用 JPG 更方便;pdf、tif、gif、bmp 也都支持。后面的 killall 让设置立即生效,不用注销。此设置只影响之后的 Cmd-Shift-3/4/5 截图,已有的文件不受影响。
03风险
!注意: JPG 是有损压缩;如果需要后期编辑或保证文字锐利,建议保留 PNG,需要时再用 sips 单独转换。
04撤销
撤销
$ defaults delete com.apple.screencapture type && killall SystemUIServer05来源
- defaults — read and write user preferences (macOS man page)依据: Documents defaults write of a domain key pair, e.g. com.apple.screencapture settings.
最后验证: 2026-09-18 · 分类: 媒体