Netstat (Network Statistics)
Netstat (Network Statistics) is like a network diagnostic tool that shows you what's happening with your computer's network connections - kind of like a traffic monitor for your computer's internet and network activity.
It shows you:
- Which programs are connected to the internet
- Which ports are open and listening
- What connections are currently active
- Where your computer is connecting to
Example Output:
netstat -an
Active Connections
Proto Local Address Foreign Address State
TCP 192.168.1.5:80 216.58.200.4:443 ESTABLISHED
TCP 127.0.0.1:3306 0.0.0.0:0 LISTENING
In this example:
- The first line shows your computer is connected to a website (probably Google) using TCP protocol
- The second line shows MySQL database (port 3306) is running and waiting for connections
Think of it like a real-time list of:
- Phone calls your computer is making (active connections)
- Phone lines that are open and waiting for calls (listening ports)
- Who's calling whom (IP addresses and ports)
It's commonly used by network administrators and developers to troubleshoot network issues or check what programs are communicating over the network.