Screenshots on macOS
Keyboard shortcuts
Section titled “Keyboard shortcuts”You can capture the entire screen, a window, or just a portion of the screen.
⌘ + ⇧ + 3Capture the whole screen.⌘ + ⇧ + 4Capture a selection.⌘ + ⇧ + 4 + SpaceCapture a window.⌘ + ⇧ + 5Capture the whole screen, a selection or a window.
See more information in Take a screenshot on your Mac.
Command line
Section titled “Command line”Command line tool that capture an image of the whole, or part of the screen.
screencapture -ioW ~/Desktop/screenshot.png-iCapture screen interactively, by selection or window.-WStart interaction in window selection mode.-oIn window capture mode, do not capture the shadow of the window.
More information in screencapture manual page.
Change default settings of screen capture
Section titled “Change default settings of screen capture”defaults write com.apple.screencapture name "Screenshot"Disable shadow in screenshots:
defaults write com.apple.screencapture disable-shadow -bool trueSave screenshots to the ~/Downloads
defaults write com.apple.screencapture location -string "${HOME}/Downloads"Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
defaults write com.apple.screencapture type -string "png"Disable datetime in screenshots filename
defaults write com.apple.screencapture include-date -bool falseTo apply the changes, you need to restart the SystemUIServer:
killall SystemUIServer