大网数据广告活动
Linux 与通用命令

grim · 常用命令示例

· 52CE 我爱测

Grab images (screenshots) from a Wayland compositor. > By default, files are saved to `$GRIM_DEFAULT_DIR` or `$XDG_PICTURES_DIR` if the first variable is unset. > If none of the environment variables are set, files are saved to the current working directory. > More information: <

grim

Grab images (screenshots) from a Wayland compositor. By default, files are saved to $GRIM_DEFAULT_DIR or $XDG_PICTURES_DIR if the first variable is unset. If none of the environment variables are set, files are saved to the current working directory. More information: https://manned.org/grim.

  • Screenshot all outputs to the default path:

grim

  • Screenshot a specific output to the specified file:

grim -o

  • Select a specific region using slurp and screenshot it:

grim -g "$(slurp)"

  • Screenshot and copy the image to the clipboard:

grim - |

  • Set the output file type (default: png):

grim -t

  • Set the PNG compression level (default: 6):

grim -l

  • Set the JPEG quality level (default: 80):

grim -t jpeg -q

  • Include cursors in the screenshot:

grim -c

来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
tldr-pages contributors
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。