System tips
Screenshots
Section titled “Screenshots”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 SystemUIServerToggle hidden files in Finder
Section titled “Toggle hidden files in Finder”Run Automator and create new Application. Add task Run Shell script and paste follow code:
STATUS=`defaults read com.apple.finder AppleShowAllFiles`if [ $STATUS == YES ];then defaults write com.apple.finder AppleShowAllFiles NOelse defaults write com.apple.finder AppleShowAllFiles YESfikillall FinderSave application. From now you can toggle hidden files with one click.
Useful commands
Section titled “Useful commands”Network speed quality
Section titled “Network speed quality”Since macOS Monterey is there a command to test your network quality:
networkQuality -vOutput will looks like follow:
==== SUMMARY ====Upload capacity: 16.239 MbpsDownload capacity: 475.129 MbpsUpload flows: 20Download flows: 12Responsiveness: Low (154 RPM)Base RTT: 26Start: 19.04.2022 13:56:47End: 19.04.2022 13:57:04OS Version: Version 12.3.1 (Build 21E258)If you’re curious, networkQuality uses Apple’s CDN at https://mensura.cdn-apple.com/api/v1/gm/config as the target for its testing.
List all mounted drives on Mac
Section titled “List all mounted drives on Mac”df -hOpen any source
Section titled “Open any source”open # [url|filename|directory...]IP address of an AirPrint printer
Section titled “IP address of an AirPrint printer”You can use ippfind command that finds services registered with a DNS server or available through local devices. Its primary purpose is to find IPP printers and show their URIs, show their current status, or run commands.
ippfindThen you get local address of printer (Internet Printing Protocol (IPP, RFC 2911)):
ipp://3036B5000000.local:XXX/ipp/printthen ping local address
ping 3036B5000000.localand here we go
PING 3036B5000000.local (192.168.0.108): 56 data bytes64 bytes from 192.168.0.108: icmp_seq=0 ttl=64 time=262.342 ms64 bytes from 192.168.0.108: icmp_seq=1 ttl=64 time=285.290 msour printer has 192.168.0.108