From 5532175b15718906d8823e8a4984be3abdbaaabb Mon Sep 17 00:00:00 2001 From: Futtetennista Date: Tue, 20 Aug 2019 19:13:45 +0100 Subject: [PATCH] lsof: find the process listening on a local port (#3188) --- pages/common/lsof.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/lsof.md b/pages/common/lsof.md index 221bcbfa4..0eb10cf7f 100644 --- a/pages/common/lsof.md +++ b/pages/common/lsof.md @@ -30,3 +30,7 @@ - List open files in a directory: `lsof +D {{path/to/directory}}` + +- Find the process that is listening on a local TCP port: + +`lsof -iTCP:{{port}} -sTCP:LISTEN`