Overview
A curated set of Terminal tips, aliases, and commands to boost your daily macOS workflow. Covers Zsh configuration, useful one-liners, and admin shortcuts.
Zsh Config Tips
Useful Aliases for ~/.zshrc
# Shortcuts
alias ll='ls -lah'
alias reload='source ~/.zshrc'
alias ip='curl -s ifconfig.me'
alias flushdns='sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder'
alias cleanup='find . -name ".DS_Store" -delete'
# macOS version quick check
alias osver='sw_vers'
Handy One-Liners
Find Large Files
# Files larger than 1GB
find / -size +1G -type f 2>/dev/null
# Show top 20 disk hogs in current dir
du -sh * | sort -rh | head -20
Network Diagnostics
# Show listening ports
lsof -i -P -n | grep LISTEN
# Check DNS resolution
dig +short google.com @8.8.8.8
# Network interface info
ifconfig en0
Keyboard Shortcuts in Terminal
Ctrl+A — Jump to beginning of line
Ctrl+E — Jump to end of line
Ctrl+R — Search command history
Ctrl+L — Clear screen
Option+Click — Move cursor to click position