Take Screenshots From Terminal With screencapture
Cmd–Shift–4 covers everyday screenshots, but the tool behind it — screencapture — has flags the GUI never exposes: arbitrary delays, shadow-free window shots, clipboard-only output, and pixel-exact regions. Here's the short list worth knowing on macOS 13 Ventura through 15 Sequoia.
The basics: capture to a file you name
# Capture the whole screen to a file
screencapture ~/Desktop/shot.png
# Interactive: drag a selection, or press Space for window mode
screencapture -i ~/Desktop/shot.png
# Same, but without the shutter sound
screencapture -x ~/Desktop/shot.png
Unlike the keyboard shortcuts, you choose the file name and destination on every call — no renaming Screenshot 2025-… files afterwards. This is the same engine behind Cmd–Shift–3 and friends, so the output is identical: PNG by default, captured at your display's native pixel resolution, which on a Retina screen means an image twice the point dimensions you see.
One prompt to expect: the first time Terminal takes a screenshot, macOS asks you to grant it permission under System Settings → Privacy & Security → Screen Recording. That's normal — screenshots and screen recording share the same privacy gate — and approving it once covers every future capture from that app. If captures silently produce empty or wallpaper-only images, a missing permission is almost always why.
Window shots without the shadow
# Click a window to capture it, minus the drop shadow
screencapture -o -w ~/Desktop/window.png
-w restricts the interactive capture to window selection — the cursor becomes a camera, and you click the window you want. -o tells it to omit the window's drop shadow, which normally adds a large transparent margin around the image. That combination is the fastest way to get clean, tightly-cropped window shots for documentation.
The GUI can do this too — Cmd–Shift–4, then Space, then Option-click the window — but the command version wins when you're capturing the same window repeatedly: the flags never change, so every shot in a series comes out consistent, and you can bind the whole thing to a shell alias instead of re-performing a four-step finger dance each time.
Timed captures and clipboard-only output
# Wait 5 seconds before capturing — time to open a menu
screencapture -T 5 ~/Desktop/menu.png
# Send the capture to the clipboard instead of a file
screencapture -c
# Interactive selection, straight to the clipboard
screencapture -i -c
-T takes a delay in seconds, which is how you photograph things that vanish the moment you press a key — open menus, hover states, drag operations. -c skips the file entirely and puts the image on the clipboard, ready to paste into a chat or document.
Formats, regions, and simple scripting
# JPEG instead of PNG (much smaller for photos of video)
screencapture -t jpg ~/Desktop/shot.jpg
# Capture an exact rectangle: x,y,width,height
screencapture -R 0,0,1280,720 ~/Desktop/region.png
# One silent frame every 60 seconds, timestamped
while true; do screencapture -x ~/Desktop/cap-$(date +%H%M%S).png; sleep 60; done
-t accepts png, jpg, pdf, and tiff. PNG is lossless and right for UI; JPEG is dramatically smaller when the screen is full of photos or video frames. -R captures a fixed rectangle — coordinates measured from the top-left of the display — with no interaction at all, which makes screenshots repeatable: every capture is the same size and position, ideal for before/after comparisons. And because it's just a command, it loops: the last example snapshots your screen once a minute until you press Control–C, a crude but effective way to keep a visual log of a long-running process.
These four flags are a fraction of what the tool supports. Run man screencapture to see the full list — video recording, specific displays, and a few options even the Screenshot app doesn't surface.
Screenshot behavior — format, save location, shadows, thumbnails — is exactly the kind of setting Mainspring handles for you. It turns 90+ hidden macOS settings into labelled, reversible toggles, so you flip a switch instead of memorizing flags.
Try Mainspring free →Signed & notarized by Apple · 1-day free trial · $29 once
Change the defaults, not every command
screencapture flags apply to a single capture. If you want every screenshot — including the Cmd–Shift shortcuts — saved somewhere other than the Desktop, change the system-wide default instead: see how to change where screenshots are saved on Mac.