Topic: Find out process for each daemon
Hi guys,
I just needed a oneliner which reminded me in last meetup.
If I remember correct Zak wanted to know how you can find which process is underlying to a service which is open on your system.
Simple example for port 80.
xaitax@w00t:~# ps auxf | grep $(fuser -n tcp 80)
80/tcp:
www-data 12274 0.0 0.1 5868 1832 ? S 04:39 0:00 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.confExplanation:
`ps auxf` gives you all running processes.
`fuser -n tcp 80` will show you the process id of the process bound to port 80.
Both combined will give you the above. ![]()
/xai