process answering port 53

Oliver Grawert ogra at ubuntu.com
Fri Jan 10 09:29:35 UTC 2014


hi,
Am Donnerstag, den 09.01.2014, 13:24 -0800 schrieb Noah:
> Hi there,
> 
> how can I figure out what process is answering port 53?  bind9-host is 
> installed but is there a command to see the process bound to a 
> particular port?
> 
> lsof -i:53 -t
> netstat -nlp
> 
> root at virt:/etc/init.d# netstat -nlp | grep 53
> unix  2      [ ACC ]     STREAM     LISTENING     2530     2986/master 
>         private/relay
> unix  2      [ ACC ]     STREAM     LISTENING     2533     2986/master 
>         public/showq
> unix  2      [ ACC ]     STREAM     LISTENING     2536     2986/master 
>         private/error
> unix  2      [ ACC ]     STREAM     LISTENING     2539     2986/master 
>         private/retry
> unix  2      [ ACC ]     STREAM     LISTENING     73379    26723/apache2 
>        /var/run/apache2/cgisock.3253
> 
try
netstat -tlpn

(-t only show tcp ports, -l show the ones listened(answered) on, -p show
the process ID)

in the "local Address" column you see the port number behind the colon.
in the last column you see the PID that you can look up with ps (if the
actual program name is not shown behind the slash)

ciao
	oli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20140110/67232c3d/attachment.sig>


More information about the ubuntu-users mailing list