UNIX BLOG

Blog for NIX system based administrators

How to find out what programs are listening on ports

The following code will show how to see all the programs that are listening:

netstat -tulpn

will show what programs are listening on ports.

Example:

root@myhost:~# netstat -tulpn Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 2393/mysqld
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 13154/apache2
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 23635/nginx
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 2462/vsftpd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2438/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2888/exim4
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 23635/nginx
tcp 0 0 45.55.168.61:10083 0.0.0.0:* LISTEN 22058/vsftpd
tcp6 0 0 :::22 :::* LISTEN 2438/sshd
tcp6 0 0 ::1:25 :::* LISTEN 2888/exim4 root@myhost:~#

Tags: , , ,


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>