6

nmap -p1-65535 localhost gives me

PORT     STATE SERVICE
8080/tcp open  http-proxy

What is the process that is using this port.

From /etc/services/:

http-alt    8080/tcp    webcache    # WWW caching service
8

You can use lsof to find out the list of processes runing on 8080

lsof -i :8080

You can get more detail about the process throught :

ps -ef | grep put_the _PID_here
|improve this answer|||||
4

If you do—

$ sudo netstat -lnp | grep :8080

you'll get something like

tcp        0      0 192.168.0.1:8080      0.0.0.0:*               LISTEN     12345/processname

The number before processname is the PID of the process listening on that port.

|improve this answer|||||
  • 1
    Note that on most distros netstat is deprecated. sudo ss -lnp should work just fine though – James_pic Oct 26 '16 at 16:51
  • @James_pic good point -- I'm just old :) – Flup Oct 26 '16 at 16:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.