Productivity
Coding
Video and graphics
System and file repair
diskutil verifyVolume /diskutil repairVolume /sudo periodic daily weekly monthlykillall AppName
Repairing the boot volume typically requires starting up in macOS Recovery.
Network and connectivity
sudo dscacheutil -flushcache; sudo killall -HUP mDNSRespondersudo ipconfig set en0 DHCPping google.com
The interface name (en0) can vary. Check System Settings > Network or run ifconfig to confirm yours.
System information
system_profiler SPSoftwareDataTypesystem_profiler SPHardwareDataType | grep "Serial Number"
Advanced tools
- Storage Management (GUI): Apple menu > About This Mac > More Info > Storage > Manage
sudo shutdown -r now
Application administration
Clear terminal history
cat /dev/null > ~/.zsh_history && history -c && exit
Clear Homebrew and App Store caches
brew cleanupbrew autoremoverm -rf ~/Library/Caches/Homebrew/*brew updatebrew upgradesudo softwareupdate -lmas upgrade
mas (Mac App Store CLI) requires separate installation via brew install mas.
Firewall
Manage the firewall through System Settings.
- Open System Settings → Network → Firewall
- Toggle the firewall on or off, and click Options for per-app rules
- Allow a specific app: Firewall → Options → add the app and set it to allow incoming connections
Copying files via terminal
cp file.txt ~/Backup/rsync -av Source/ Destination/scp file.txt user@host:/path/
Disk usage and storage
- Apple menu → About This Mac → More Info → Storage for an overview per category
df -hfor total and free space per volumedu -sh *to see folder sizes in the current directory
Scheduled tasks
- launchd manages scheduled jobs via plist files in
~/Library/LaunchAgents(user) or/Library/LaunchDaemons(system) crontab -efor traditional cron-style scheduling
Compression and archiving
- Right-click a file or folder → Compress
zip -r archive.zip folder/andunzip archive.ziptar -czvf archive.tar.gz folder/andtar -xzvf archive.tar.gz
