Homebrew
Homebrew installs the stuff you need that Apple (or your Linux system) didn’t.
Useful libs
# Gives you the exact Linux `watch` command.
brew install watch
#
brew install grafana
#
brew install prometheus
# CatBoost requires Ninja for building from source
brew install ninja
# Bun is an all-in-one toolkit for developing modern JavaScript/TypeScript applications.
brew install oven-sh/bun/bunOther Libraries
#
Useful commands & Shortcuts
Ports related
Check all ports in use:
lsof -i -P -n | grep LISTENlsof: Lists open files (including network connections)-i: Shows internet connections-P: Shows port numbers (not service names)-n: Shows IP addresses (not hostnames)grep LISTEN: Filters to show only listening ports
Check a specific port:
lsof -i :PORT_NUMBERFor example, to check what’s using port 8080:
lsof -i :8080Alternative using netstat:
netstat -anv | grep LISTENMore detailed view with process names:
sudo lsof -iTCP -sTCP:LISTEN -n -PThe output shows:
- COMMAND: The process name
- PID: Process ID
- USER: User running the process
- NAME: The port being used (e.g.,
*:8080)
Show hidden files
To show hidden files on a Mac, press Command + Shift + . (the period key) in any Finder window to make hidden items visible as translucent files, then press the same shortcut again to hide them.1