Know the service running in a port – Linux

April 21st, 2010 | 2 Comments | Posted in Security, Servers

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

Leave a Reply 999 views, 1 so far today |
Tags: , ,

Author : Albin Sebastian

I am a Technology Blogger, I Blog about technology related articles, Active in online and offline tech communities
Follow Discussion

2 Responses to “Know the service running in a port – Linux”

  1. Sreenadh Says:

    here is another method to list the process and their associated port and IP
    netstat -tunlp

  2. Albin Sebastian Says:

    @ Sreenadh,

    This is very easy to find the service, Thanks for sharing.

Leave a Reply

CommentLuv Enabled