Tuesday, 21 June 2011

Aide Memoire - remembering how to identify which process is hogging which port

For some reason, I always forget this so am hoping that, by writing it down here in my blog, I'll actually remember.

Having run a command such as: -

$ netstat aon

or: -

$ netstat -nlp

to see that something is listening on port 80, it's then useful to see what the process actually is: -

$ lsof -i :80

or: -

$ lsof -i tcp:80

will show you the way to go.

lsof is an immensely useful command, as blogged here.

Perhaps I should use this as a future tip if I'm ever invited back to @ThisWeekInLotus.

No comments: