How to check all open ports?

To check all open ports on your system, you can use the netstat or ss command. Here are examples of both:

Using netstat:

netstat -tuln
  • -t: Show TCP ports.
  • -u: Show UDP ports.
  • -l: Show only listening ports.
  • -n: Show numerical addresses instead of resolving hostnames.

Using ss:

ss -tuln
  • The options are similar to netstat, providing a quick overview of open ports.

Example Output:

You might see output like this:

Proto Recv-Q Send-Q Local Address:Port   Peer Address:Port
tcp   LISTEN  0      128                  0.0.0.0:22
tcp   LISTEN  0      128                  0.0.0.0:80

This indicates which ports are open and listening for connections.

Feel free to ask if you need more information!

0 Comments

no data
Be the first to share your comment!