Skip to content

Take timed or scripted screenshots from Terminal — via Apple (man page mirror by Keith Smiley)

Commandlow riskmacOS 14 Sonoma and later

The built-in screencapture command can do things the toolbar can't easily: a silent capture after a delay, a capture of an exact rectangle, or one that opens straight in Preview. Useful for capturing menus or hover states, and for scripts.

Takes effect right away

The easy way

  1. The example waits 5 seconds (-T 5), captures only the main display (-m), skips the camera sound (-x) and saves to delayed-shot.png on the desktop. Pick a file name that doesn't exist yet, or the old file is replaced.
  2. Other handy options: -i interactive selection, -c to the clipboard, -P open in Preview, -R x,y,w,h a fixed rectangle, -o no window shadow, -v record video.
  3. Run screencapture -help for the full list.

Command

Run in Terminal (Applications › Utilities).

screencapture -m -T 5 -x ~/Desktop/delayed-shot.png
Without -m, a full-screen capture on a Mac with several displays saves one file per screen, so you'd list one file name per display (or use -D 2 to pick a specific display). The first time, macOS may ask you to allow Terminal to record the screen in System Settings > Privacy & Security. To undo, delete the screenshot file(s) you created.

Sources

Source reviewed
2026-11-02
Link checked
2026-11-02
Tested hands-on
Not by Oddbyte.Me

Oddbyte.Me hasn't tried this on every macOS version, so keep the undo handy.

screenshotterminalscreencapturetimerdelayscript

More in Screenshots