↓ Skip to main content

Shorts: Find out which port is used by which process under Linux

·100 words·1 min
 Author
Author
Michael Bretterklieber
Software Developer

To show which port is used by which process under Linux use this easy to remind command:

netstat -tulpen
root@zenmaster:~# netstat -tulpen
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name
tcp        0      0 127.0.0.2:443           0.0.0.0:*               LISTEN      0          22027      2698/nginx: master
tcp        0      0 127.0.0.2:80            0.0.0.0:*               LISTEN      0          22025      2698/nginx: master
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      996        3787       1595/systemd-resolv
tcp        0      0 127.0.0.1:8888          0.0.0.0:*               LISTEN      1000       221315     18330/ssh
tcp        0      0 127.0.0.1:8448          0.0.0.0:*               LISTEN      1000       221323     18330/ssh
...

It might be possible, that you have to install net-tools (debian based systems).