Forrest logo
back to the netstat tool

netstat:tldr:96c65

netstat: List listening TCP and UDP ports (+ user and process if you're root).
$ netstat --listening --program --numeric --tcp --udp --extend
try on your machine

The command "netstat --listening --program --numeric --tcp --udp --extend" is used to display detailed information about the active network connections on a system.

  • "netstat" is the command-line utility used to display network connection information in various formats.
  • "--listening" option filters the output to only show the listening sockets, which are the ones actively listening for incoming connections.
  • "--program" option displays the program name or process ID associated with each connection.
  • "--numeric" option displays the IP addresses and port numbers as numeric values instead of resolving them to their corresponding hostnames or service names.
  • "--tcp" option filters the output to only show TCP (Transmission Control Protocol) connections.
  • "--udp" option filters the output to only show UDP (User Datagram Protocol) connections.
  • "--extend" option provides extended information about the connections, such as the user owning the process and the state of the connection.

By using all these options together, the command presents a detailed overview of actively listening TCP and UDP connections, including the associated processes and additional information.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the netstat tool