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 Take a Timed Screenshot from Terminal on macOS

How to Take a Timed Screenshot from Terminal on macOS

Set a custom delay for a timed screenshot from Terminal on macOS, then choose its filename, save folder, image format, and pointer settings.

How to Get a Catalina-Style Menu Bar on macOS Big Sur

How to Get a Catalina-Style Menu Bar on macOS Big Sur

Restore a solid Catalina-style menu bar on Big Sur with compatible Boring Old Menu Bar v1.27. Follow the install steps, set light and dark styles, and troubleshoot common issues.

How to Link an Apple ID to a Mac User Account

How to Link an Apple ID to a Mac User Account

Sign in with your Apple ID (now called an Apple Account) in System Settings, then configure the separate Mac login password recovery option for that user.

How to Hide Your Mac From Other Devices on a Network

How to Hide Your Mac From Other Devices on a Network

Turn off Mac sharing services and enable Firewall stealth mode to limit local discovery, with clear notes on what your router and other devices can still see.

How to Check the Mic on a Mac (Built-In or External)

How to Check the Mic on a Mac (Built-In or External)

Learn how to check a Mac microphone using Sound settings and QuickTime, choose the right input, verify permissions, and fix common no-input problems.

How to View CPU, RAM, Disk, and Network Usage in the macOS Menu Bar

How to View CPU, RAM, Disk, and Network Usage in the macOS Menu Bar

Use the free Stats app to show CPU, memory, disk, and network usage in the macOS menu bar, customize widgets, and fix missing icons on macOS 26.

How to Install a Mail Plugin on macOS

How to Install a Mail Plugin on macOS

Install a Mail plugin on macOS using the current Mail Extensions workflow, enable it in Mail settings, and handle older .mailbundle plugins safely.

How to Download YouTube Videos on macOS: Official Methods

How to Download YouTube Videos on macOS: Official Methods

Learn how to download YouTube videos on a Mac with YouTube Premium, save your own uploads as MP4 files, and avoid outdated downloader apps.

How to Download Older Versions of macOS from Apple

How to Download Older Versions of macOS from Apple

Learn how to download older macOS installers from Apple using the App Store, Terminal, or official DMG links, with compatibility and error tips.

How to Toggle the Touch Bar On or Off on macOS

How to Toggle the Touch Bar On or Off on macOS

macOS has no built-in Touch Bar off switch. Learn how to change Touch Bar settings and use Hide My Bar to toggle it off and back on.