1. Home
  2. Mac OS X

How to take a timed screenshot from Terminal on macOS

On macOS you can take a timed screenshot. The timer can be set for 5 or 10 seconds from the Screenshot utility. If you need a longer timer, for whatever reason, the default screenshot tool won’t let you set one. You can find a third-party app to do the job or you can use the Terminal and set as long a timer as you need.

Timed screenshot from Terminal

Open Terminal and enter the following command. You will need to edit it before you run it to suit your needs. The command, as you see it below, will take a screenshot 20 seconds after it has been run. It will save the screenshot to the desktop and name it MyScreenshot. The file will be saved as a PNG file. There is a lot to edit here before you can run the command.

screencapture -C -T20 Desktop/MyScreenshot.png

The first thing to edit is the timer. To change the timer, change the number accompanying the -T switch to whatever suits you. The time is given in seconds so if you’d like to take a screenshot after 30 seconds, you will use -T30.

Next, you can change where the screenshot is saved. Replace Desktop, with wherever it is you like to save the screenshot to. Finally, change the name after the forward-slash i.e., ‘MyScreenshot.png’ to whatever you’d like the screenshot to be called.

After the command has been edited, tap Enter. Minimize the Terminal window so that it is not included in the screenshot. Set up whatever it is you need to on the screen so that the screenshot comes out the way you want it to. When the screenshot is captured, you will hear the audio alert i.e., the camera shutter sound to indicate the screenshot has been captured.

You won’t see the floating screenshot thumbnail and the file will be saved automatically. You can edit it later if you want.

This command is still using the stock Screenshot tool but when it’s run from the Terminal, it can be used more flexibly e.g., you can change almost every aspect of it like the timer, the save location, the name, and even the file format if you don’t want a large PNG file.

A timed screenshot is handy when you need to set your screen up before you capture it but whatever is being set up might be dismissed if you interact with your system to take the screenshot. On macOS, the UI elements e.g. tooltips and menus, are pretty easy to screenshot but there are always exceptions especially if you’re dealing with a browser or a third-party app in the screenshot.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.