macOS Power User Tips & Tricks
macOS Power User Tips
Collection of useful macOS command-line tricks and productivity tips for developers and system administrators. These commands leverage macOS's built-in tools and Unix foundation for enhanced workflow efficiency.
Terminal Prerequisites
Most commands require Terminal.app or your preferred terminal emulator. Some commands may need Homebrew for additional tools like jq.
Clipboard Operations¶
JSON Formatting¶
Perfect for developers working with APIs and JSON data:
- Takes JSON from clipboard, formats it with jq, and copies back to clipboard
jq Installation
Install jq via Homebrew: brew install jq
File to Clipboard¶
- Reads file contents and copies to system clipboard
- Alternative using input redirection (more efficient)
Usage Examples
System Monitoring¶
Thermal Information¶
Monitor your Mac's thermal state and temperature sensors:
Admin Privileges Required
The powermetrics command requires sudo privileges to access hardware sensors.
Advanced System Information¶
CPU and Performance Metrics¶
- Displays CPU power consumption and performance states
- Shows System Management Controller data including voltages and currents
Memory and Disk Information¶
- Display virtual memory statistics
- Show disk space usage in human-readable format
- Quick memory usage summary
Network Utilities¶
Network Configuration¶
- Display network interface configuration
- Show routing table
- List open network connections
Wi-Fi Management¶
- List all network hardware ports
- Scan for available Wi-Fi networks (requires airport utility)
Application Management¶
Process Management¶
Process Operations
ps aux | grep <process_name> #(1)!
pkill -f <process_name> #(2)!
launchctl list #(3)!
- Find running processes by name
- Kill processes by name pattern
- List all launch services
Application Information¶
- Detailed information about installed applications
- Find all applications using Spotlight metadata
Security and Privacy¶
File Permissions and Attributes¶
- List files with extended attributes
- Display extended attributes for specific file
- Verify code signature of applications
System Integrity Protection¶
- Check System Integrity Protection status
Development Tools¶
Xcode Command Line Tools¶
Developer Tools
xcode-select --print-path #(1)!
xcode-select --install #(2)!
xcrun --show-sdk-path #(3)!
- Show current developer directory path
- Install Xcode command line tools
- Display SDK path for development
Package Management¶
- List installed Homebrew packages
- Show packages with available updates
- Clean up old package versions
Performance and Optimization¶
Disk Usage Analysis¶
- Check size of common user directories
- Interactive disk usage analyzer (install via
brew install ncdu)
Cache Management¶
- Flush DNS cache
- Restart mDNS responder for network discovery
Additional Resources¶
Useful Tools to Install
- jq - JSON processor
- htop - Interactive process viewer
- tree - Directory structure visualization
- ncdu - Disk usage analyzer
- wget/curl - Download utilities