Blog

03/06/2019

HowTo: OS X Take a Screenshot On My Mac Desktop



I can use Shutter app in GNU/Linux to take a screenshot of a specific area, window, whole screen, or even of a website. How do I take a screenshot on my mac book pro/mini desktop using Mac OS X?

Shutter application not available on Apple OS X or Apple based systems. However, you can take pictures of the screen (screenshots). They are saved as files on the desktop or put a screenshot in the Clipboard using Mac OS X keyboard shortcuts. No need to download and install paid applications. You can use the following keyboard shortcuts to capture:

  1. The whole screen / desktop.
  2. Part of the screen / desktop.
  3. Part of the menu or toolbar.

Please note that you can also take screenshots using the Grab app.

How do I take a picture of the whole screen?

You need to hold down Command (⌘), and press Shift & 3 keys simultaneously:

Command (⌘)-Shift-3

Pictures of the screenshot is saved as files on the desktop in the following format i.e. file name will be as follows:

Screen Shot 2013-08-09 at 2.57.32 PM

How do I take a picture of part of the screen?

You need to hold down Command (⌘), and press Shift & 4 keys simultaneously:

Command (⌘)-Shift-4

Make sure you drag the cross-hair (X) pointer to select the area. Continue to press the mouse button, release the keys, and then press Shift, Option, or the Space bar while you drag to resize the selection area. When you are ready to take a picture, release the mouse button.

Note: To cancel, press Escape before you release the mouse button.

The default screenshot format is set to .png file.

Say hello to screencapture command

You can use screencapture command from the Terminal to capture images from the screen and save them to a file or the clipboard. The syntax is:

screencapture /path/to/file.jpg
screencapture [option] /path/to/file.jpg

The following command will capture the entire desktop and save it to ~/Desktop/my-shot-1.png file:
screencapture ~/Desktop/my-shot-1.png
To view your screenshotp go to desktop or type the following command from the terminal:
open ~/Desktop/my-shot-1.png
Pass the -c option to force screen capture to go to the clipboard:
screencapture -c
Press command (⌘)-v to paste screenshot in your office or photo editing application.
Pass the -i option to capture screen interactively, by selection or window. The control key will cause the screen shot to go to the clipboard. The space key will toggle between mouse selection and window selection modes. The escape key will cancel the interactive screen shot:
screencapture -i ~/Desktop/my-shot-1.png
The following is a list of all supported options:

     -c      Force screen capture to go to the clipboard.

     -C      Capture the cursor as well as the screen.  Only allowed in non-interactive modes.

     -i      Capture screen interactively, by selection or window.  The control key will cause the screen shot to go to the clipboard.  The space key will
             toggle between mouse selection and window selection modes.  The escape key will cancel the interactive screen shot.

     -m      Only capture the main monitor, undefined if -i is set.

     -M      Open the taken picture in a new Mail message.

     -o      In window capture mode, do not capture the shadow of the window.

     -P      Open the taken picture in a Preview window.

     -s      Only allow mouse selection mode.

     -S      In window capture mode, capture the screen instead of the window.

     -t       Image format to create, default is png (other options include pdf, jpg, tiff and other formats).

     -T       Take the picture after a delay of , default is 5.

     -w      Only allow window selection mode.

     -W      Start interaction in window selection mode.

     -x      Do not play sounds.

     -a      Do not capture attached windows.

     -r      Do not add screen dpi meta data to captured file.
References
  • KB – PH11229.
  • See screencapture command man page for more information.

Posted by: SXI ADMIN

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

14/08/2019

How to KVM, QEMU start or stop virtual machine from command line (CLI)

KVM or Kernel Based Virtual Machine is a popular virtualization technology. It allows you to run virtual guest machines over a host machine. To start...
14/08/2019

How to Docker backup Saving and restoring your volumes

Running a Docker volume backup First, we spin up a temporary container, and we mount the backup folder and the target Docker volume to this container....
12/08/2019

How to Start and Enable Firewalld on CentOS 7

In this article, we discuss how to start and enable firewalld. It is highly recommended that you have a firewall protecting your server.Pre-Flight CheckThese...