Know the service running in a port – Linux

In our previous article we explained the steps for windows. Here you can find the steps to identify the service running in a port on linux . Here we used commands “fuser” and “PS”. I am using apache2 web server  on port 80. Replace your port number with 80 (my example with port 80 )

Run following command to find the Process ID from port number

root@server:~ # fuser -n tcp 80

Now you can see the Process IDs associated with this service

80/tcp:               2584 15941 15943 15944 15945 16332 16333 16880 16881 16882 16899

Run the following command to find the service name from process ID

root@server:~ # ps -ef | grep 2584

root      2584     1  0 Apr01 ?        00:00:08 /usr/sbin/apache2 -k start

Linux port and service

About Albin Sebastian

I am a Technology Blogger, System Administrator by profession and webmaster by passion. Technology blogger, Active in Online and offline tech communities.

Check Also

tcpdump DNS output

vmware data protection (VDP) ip/dns could not be resolved

“ANY” (*) DNS Query is used by VMware Data Protection (VDP) After a VMware migration …