Skip to content

Instantly share code, notes, and snippets.

@sabahtalateh
Created May 6, 2018 11:49
Show Gist options
  • Save sabahtalateh/76676a90dcb5f98ecef11096578bd4a3 to your computer and use it in GitHub Desktop.
Save sabahtalateh/76676a90dcb5f98ecef11096578bd4a3 to your computer and use it in GitHub Desktop.
lsof macos
# Combine with other protocols if needed.
# -P Prevent convertion from service name to number, -iTCP - (-i{PROTO} select given protocols),
# -sTCP:LISTEN (-s select give protocol state)
lsof -PiTCP -sTCP:LISTEN | grep {portnumber}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment