sudo lsof \
# convert hosts and ports files to the equivalent being accessed
-nP \
# grep only the process using that
-t \
# grep only port 6060
-sTCP:LISTEN -iTCP:6060
Created
October 25, 2023 18:43
-
-
Save ppcamp/18c5c4a0eb3243343a97a013623683e3 to your computer and use it in GitHub Desktop.
Grep current program using some TCP port
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment