What is `netstat`?

netstat is a command-line utility that displays the network connections on that machine. Using the -a option shows all the connections. Using the -n option will show the IP addresses instead of the host names. It shows the source and destination port for established connections. If the output is too many lines, we can display one page at a time using the more command.

Refer this - https://www.geeksforgeeks.org/netstat-command-linux/