oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button

Screenshot Hacks for Mac OS X
Pages: 1, 2, 3

Using screencapture in the Terminal App.

The Terminal application comes with a command-line screen capture utility known as screencapture.

This utility provides capabilities similar to those of Grab. To use it, invoke the Terminal window and type screencapture to see the various options supported:

screencapture: illegal usage, file required if not going to clipboard
usage: screencapture [-icmwsWx] [file] [cursor]
  -i      capture screen interactively, by selection or window
            control key - causes screen shot to go to clipboard
            space key   - toggle between mouse selection and
                          window selection modes
            escape key  - cancels interactive screen shot
  -c      force screen capture to go to the clipboard
  -m      only capture the main monitor, undefined if -i is set
  -w      only allow window selection mode
  -s      only allow mouse selection mode
  -W      start interaction in window selection mode
  -x      do not play sounds
  file    where to save the screen capture

To capture the entire screen, type:

screencapture imagefilename.pdf

The image will be saved as imagefilename.pdf.

To capture the screen interactively, type:

screencapture -i imagefilename.pdf


  • Press the Control key to copy the screen to the clipboard (and Command-V to paste the captured image into your application), or
  • Press the Space key to toggle between capturing a window (Figure 12) and a region (Figure 13).

Screen shot.
Figure 12. Capturing a screenshot of a window.

Screen shot.
Figure 13. Capturing a screen shot of a region.

Wrapping Up

As you can see, there are many options in Mac OS X for capturing images from your screen and saving them to your hard disk. For most tasks, the free utility Grab or enabling screencapture in the Terminal application should suit your needs. But if you want that professional touch, or are interested in audio/video capture, then take a look at the $49 version of Snapz Pro X.

Wei-Meng Lee (Microsoft MVP) is a technologist and founder of Developer Learning Solutions, a technology company specializing in hands-on training on the latest Microsoft technologies.

Derrick Story is the author of The Photoshop CS4 Companion for Photographers, The Digital Photography Companion, and Digital Photography Hacks, and coauthor of iPhoto: The Missing Manual, with David Pogue. You can follow him on Twitter or visit

Return to Mac DevCenter.