How to check for open ports in linux

sudo netstat -plnt

In my case, I got an output like:n my case, I got an output like:

[email protected]:~# sudo netstat -plnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 8263/sshd
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 6802/php-fpm.conf)
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 3957/mysqld
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 4478/nginx
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 3373/exim4
tcp 0 0 0.0.0.0:2812 0.0.0.0:* LISTEN 23794/monit
tcp6 0 0 :::4129 :::* LISTEN 8263/sshd
tcp6 0 0 ::1:25 :::* LISTEN 3373/exim4

Leave a comment

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