How to Take a Timed Screenshot from Terminal on macOS

To take a timed screenshot from Terminal on macOS, use the built-in screencapture command with its -T delay option. For example, screencapture -T 20 "$HOME/Desktop/MyScreenshot.png" waits 20 seconds, then saves a PNG named MyScreenshot.png on your Desktop. Press Return, use the delay to arrange the screen, and check the file at the path you supplied.

A macOS Terminal window with screencapture -T 20 saving MyScreenshot.png to the Desktop.
The command sets a 20-second delay and writes a PNG to the current user’s Desktop.

Why use Terminal for a timed screenshot?

The Screenshot app already has a timer, a save-location menu, and options for showing the pointer. It is often the easiest choice for a one-off capture: press Shift-Command-5, open Options, and choose a timer. Terminal is useful when you want to set a precise delay in seconds, name the output file in advance, save it to a specific folder, or reuse the same command in a workflow.

The command uses macOS’s built-in screenshot utility, so you do not need to install another app. The -T option specifies how many seconds to wait before capturing. The command below uses 20 seconds as an example; replace that value with the time you need.

Set up the command

  1. Open Terminal from Applications > Utilities or search for it with Spotlight.
  2. Choose a folder and filename. The example uses the Desktop, which already exists on a standard Mac account. $HOME expands to your user folder, so the command does not depend on your account’s short name.
  3. Enter the command, changing the delay or output name if needed:
    screencapture -T 20 "$HOME/Desktop/MyScreenshot.png"
  4. Press Return. Switch to the app or screen you want to capture while the timer runs. If you do not want Terminal included in a full-screen capture, minimize its window with Command-M or move to the target app.
A blank TextEdit window on a Mac desktop, ready to be arranged before taking a screenshot.
Arrange the screen you want to capture while the timer is running.

The command runs in Terminal while macOS waits. It does not show a graphical countdown, so leave enough time to reach the target screen and open any menu or tooltip you want to capture. A short delay is convenient for a prepared screen; allow more time if you need to switch apps and interact with the interface.

Understand and customize the command

PartWhat it does
screencaptureRuns the macOS screen-capture utility.
-T 20Waits 20 seconds before capture. Replace 20 with another delay in seconds.
"$HOME/Desktop/MyScreenshot.png"Sets the save location and filename. The quotes keep the path together if a folder or filename contains spaces.

Choose a different delay, folder, or name

For a 30-second wait, change -T 20 to -T 30. To save in a Screenshots folder inside Pictures, use "$HOME/Pictures/Screenshots/Menu.png" as the final argument. Create that folder first if it does not exist; a command-line tool cannot save a file into a missing directory. Keep the quotation marks around paths with spaces, and use a filename that describes the capture so you can find it later.

A Terminal command with the 30-second delay value selected in screencapture -T 30.
Change the number after -T to set a different wait time in seconds.

Change the image format or include the pointer

PNG is the default format. To save a JPEG instead, set the format with -t jpg and use a matching filename extension:

screencapture -t jpg -T 10 "$HOME/Desktop/QuickCapture.jpg"

The macOS manual lists PNG, JPEG, TIFF, PDF, and other format options; available details can vary by system version. Add -C to include the pointer in a noninteractive capture, or -x to suppress the capture sound. For example: screencapture -C -T 20 "$HOME/Desktop/WithPointer.png". These flags do not change the delay or destination.

A Finder window open to Desktop with MyScreenshot.png visible.
After capture, open the folder in the command to confirm the image was saved.

Find the screenshot and fix common problems

When the delay finishes, open the destination folder in Finder and look for the filename you entered. If the image is missing, check that the destination folder exists, the path is spelled correctly, and the filename extension matches the selected format. An absolute path beginning with $HOME helps avoid confusion about Terminal’s current working folder.

If capture is blank or macOS denies it, check System Settings > Privacy & Security > Screen & System Audio Recording for Terminal’s access. Apple documents this control for apps that record the screen. Some protected apps or media windows may still block screenshots, so a permission change cannot override an app’s restriction.

For a selected window or region, use the Screenshot app when its visual controls are easier than command-line options. Press Shift-Command-5, open Options, set the timer and save location, then choose the capture mode. Apple’s current Mac guide explains these controls and the available capture choices.

Check the options on your Mac

Because the command-line manual can differ between macOS releases, run man screencapture in Terminal to see the options installed on your Mac. The -T delay and -t format flags are documented in the macOS manual. For a no-command alternative, Apple’s Screenshot guide describes the timer and save-location controls; Apple also explains screen and system audio recording permissions. See the macOS 13.6.5 screencapture manual page as a reference, then defer to the manual on your own Mac for version-specific details.

Leave a Comment

How to Screenshot on Mac: A Comprehensive Guide

How to Screenshot on Mac: A Comprehensive Guide

Learn how to screenshot on Mac with shortcuts for the full screen, an area, or a window, plus the Screenshot app, clipboard, editing, and save-location tips.

How to Add Multiple Images to a Single PDF on macOS

How to Add Multiple Images to a Single PDF on macOS

Combine multiple images into a single PDF on macOS using Finder or Preview. Control page order, avoid cropping, and fix missing pages without extra software.

How to View FPS on macOS: Steam and Apple’s Metal HUD

How to View FPS on macOS: Steam and Apple’s Metal HUD

Learn how to show FPS on a Mac with Steam’s performance overlay or Apple’s Metal Performance HUD, plus fixes when the counter does not appear.

How to Force Quit on a Mac: 5 Quick Ways to Close an App

How to Force Quit on a Mac: 5 Quick Ways to Close an App

Use Option–Command–Esc to force quit an unresponsive Mac app, or close it from the Apple menu, Dock, Activity Monitor, or Terminal.

How to Use Split Screen on Mac: Put Two Apps Side by Side

How to Use Split Screen on Mac: Put Two Apps Side by Side

Set up Split View, resize or replace a pane, use Mission Control, and learn when desktop window tiling is a better fit on your Mac.

How to Remove EXIF Data from Photos on macOS

How to Remove EXIF Data from Photos on macOS

Learn how to remove EXIF data from photos on macOS, hide location in Photos, clean exported JPEG copies with ExifTool, and verify the result.

How to Sync Two Folders on a Mac Safely

How to Sync Two Folders on a Mac Safely

Sync two folders on a Mac with SyncTwoFolders, choose a one-way or two-way update, and preview changes before files are replaced or removed.

How to Back Up a Tumblr Blog on a Mac

How to Back Up a Tumblr Blog on a Mac

Back up a Tumblr blog on your Mac with Tumblr’s web export. Download and unpack the ZIP, keep its posts and media safe, and know what the archive leaves out.

How to Use Google Maps on a Mac Desktop

How to Use Google Maps on a Mac Desktop

Use Google Maps on your Mac in Safari or Chrome, find places and routes, switch map layers, and add a Safari web app to your Dock on macOS Sonoma 14 or later.

5 Best Free WAV to MP3 Converters for Windows and macOS

5 Best Free WAV to MP3 Converters for Windows and macOS

Compare five free WAV-to-MP3 converters for Windows and macOS, including online file limits, local batch tools, and practical export settings.