Find Program Listening on TCP/IP Port in Windows or Linux
In Windows:
To figure out what program is using a particular tcpip port in Windows:
(Useful to examine suspiciously open ports, or to resolve port conflicts)
-
In WinXP (and higher?),
-
netstat -o shows process that owns a connection
-
netstat -b shows the executable
-
netstat -a shows listening -- this is probably the one you want.
-
netstat -a -b show listening + executable name.
-
-
E.g. "netstat -p udp -a 100". Then investigate if the output contains line like "UDP YOURCOMPUTERNAME:ms-sql-m". If it does, you might be running MS SQL 2000
-
In other versions of windows, you can download "TcpView" from systernals.com. It works great, just like the rest of their tools.
For Linux:
netstat is still the program to call. Try the -p option.
With Virtuozzo, I'm not convinced that -p works -- correction, my version of netstat was quite old. Updating the net-tools package with yum "fixed" it, it seems.
ps -Af lists the command line of all programs.
tags: ports, tcpip, program, process, list, win, winxp, linux, locked, port,
>>
Leonard Chan's Homepage
>>
Scribble Web
>> Find Program Listening on TCP/IP Port in Windows or Linux