Skip to content

Instantly share code, notes, and snippets.

@fjrti
Last active January 22, 2025 14:04
Show Gist options
  • Save fjrti/41c57a6ffb1889b9f2b04bee93a04ecc to your computer and use it in GitHub Desktop.
Save fjrti/41c57a6ffb1889b9f2b04bee93a04ecc to your computer and use it in GitHub Desktop.
#! /bin/bash
# Usage: ./who_is_listening.sh <PORT>
echo "What process is listening to $1"
lsof -nP -i4TCP:$1 | grep LISTEN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment