ss is a tool to investigate sockets. It is similar to netstat, but shows more information. To see list of all open ports, run
ss -tlnp
Example
boby@sok-01:~$ sudo ss -lntp State Recv-Q Send-Q Local Address:Port Peer Address:Port Process LISTEN 0 128 127.0.0.1:7878 0.0.0.0:* users:(("ssh",pid=2401,fd=5)) LISTEN 0 80 127.0.0.1:3306 0.0.0.0:* users:(("mysqld",pid=1135,fd=19)) LISTEN 0 4096 0.0.0.0:111 0.0.0.0:* users:(("rpcbind",pid=880,fd=4),("systemd",pid=1,fd=34)) LISTEN 0 511 0.0.0.0:80 0.0.0.0:* users:(("nginx",pid=1147,fd=10),("nginx",pid=1146,fd=10),("nginx",pid=1145,fd=10),("nginx",pid=1144,fd=10),("nginx",pid=1143,fd=10)) LISTEN 0 32 192.168.122.1:53 0.0.0.0:* users:(("dnsmasq",pid=1528,fd=6)) LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=883,fd=13)) LISTEN 0 5 127.0.0.1:631 0.0.0.0:* users:(("cupsd",pid=929,fd=7)) LISTEN 0 511 127.0.0.2:443 0.0.0.0:* users:(("nginx",pid=1147,fd=11),("nginx",pid=1146,fd=11),("nginx",pid=1145,fd=11),("nginx",pid=1144,fd=11),("nginx",pid=1143,fd=11)) LISTEN 0 1 0.0.0.0:7070 0.0.0.0:* users:(("anydesk",pid=1054,fd=32)) LISTEN 0 128 [::1]:7878 [::]:* users:(("ssh",pid=2401,fd=4)) LISTEN 0 4096 [::]:111 [::]:* users:(("rpcbind",pid=880,fd=6),("systemd",pid=1,fd=36)) LISTEN 0 5 [::1]:631 [::]:* users:(("cupsd",pid=929,fd=6)) boby@sok-01:~$
See netstat
Leave a Reply