Commands Hub

Copy-ready commands for developers and power users

Remove Quarantine Attribute

xattr -dr com.apple.quarantine /path/to/AppName.app

Remove quarantine attribute from downloaded apps

Bypasses macOS security warnings for downloaded apps
macOSBeginner

Hide the Dock

defaults write com.apple.dock autohide -bool true; killall Dock

Automatically hide and show the Dock

macOSBeginner

Show the Dock

defaults write com.apple.dock autohide -bool false; killall Dock

Keep the Dock always visible

macOSBeginner

Show Hidden Files

defaults write com.apple.finder AppleShowAllFiles -bool true; killall Finder

Display hidden files and folders in Finder

macOSBeginner

Hide Hidden Files

defaults write com.apple.finder AppleShowAllFiles -bool false; killall Finder

Hide hidden files and folders in Finder

macOSBeginner

Disable Gatekeeper

sudo spctl --master-disable

Allow installation of apps from any source

Reduces system security - use with caution
macOSAdvanced

Enable Gatekeeper

sudo spctl --master-enable

Restore default app security settings

macOSAdvanced

Remove Quarantine Attribute

xattr -dr com.apple.quarantine /path/to/AppName.app

Remove quarantine attribute from downloaded apps

Bypasses macOS security warnings for downloaded apps
macOSBeginner

Open Safari

open -a "Safari"

Launch Safari browser from Terminal

macOSBeginner

Hide Folder

chflags hidden ~/FolderName

Hide a folder in Finder (replace FolderName)

macOSBeginner

Unhide Folder

chflags nohidden ~/FolderName

Make a hidden folder visible in Finder

macOSBeginner

Empty Trash

rm -rf ~/.Trash/*

Empty the Trash from command line

Permanently deletes all files in Trash
macOSBeginner

Lock Screen

pmset displaysleepnow

Immediately lock the screen

macOSBeginner

Speed Up Dock Animation

defaults write com.apple.dock autohide-time-modifier -float 0.2; killall Dock

Make Dock appear/hide faster

macOSBeginner

Disable Dock Animation

defaults write com.apple.dock autohide-time-modifier -int 0; killall Dock

Remove Dock hide/show animation entirely

macOSBeginner

Reset Dock to Default

defaults delete com.apple.dock; killall Dock

Reset Dock to factory settings

macOSBeginner

Enable Dark Mode

osascript -e "tell app "System Events" to tell appearance preferences to set dark mode to true"

Switch to dark mode from Terminal

macOSBeginner

System Information

system_profiler SPSoftwareDataType

Display macOS version and system info

macOSBeginner

CPU Usage

top -l 1 -s 0 | grep "CPU usage"

Show current CPU usage statistics

macOSBeginner

Memory Pressure

memory_pressure

Check system memory pressure

macOSBeginner

Disk Usage

df -h

Show disk space usage for all mounted drives

macOSBeginner

Flush DNS Cache

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Clear DNS cache to fix network issues

macOSBeginner

WiFi Information

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I

Display detailed WiFi connection info

macOSBeginner

Network Speed Test

networkQuality

Built-in network speed test (macOS 12+)

macOSBeginner

Text to Speech

say "Hello from Terminal"

Make macOS speak text aloud

macOSBeginner
25 commands