|Est. reading time||5m|
- The whole screen / desktop.
- Part of the screen / desktop.
- 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:
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:
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:
To view your screenshotp go to desktop or type the following command from the terminal:
Pass the -c option to force screen capture to go to the clipboard:
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.
- KB – PH11229.
- See screencapture command man page for more information.
🐧 2 comments so far... add one ↓
|Category||List of Unix and Linux commands|
|Disk space analyzers||df • ncdu • pydf|
|File Management||cat • cp • mkdir • tree|
|Firewall||Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04|
|Network Utilities||NetHogs • dig • host • ip • nmap|
|OpenVPN||CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04|
|Package Manager||apk • apt|
|Processes Management||bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time|
|Searching||grep • whereis • which|
|User Information||groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w|
|WireGuard VPN||Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04|