Junior — Middle
What role does the netstat command play in the Linux operating system?
sobes.tech AI
Answer from AI
The netstat command in Linux is used to display network statistics and information about network connections. It allows you to see active TCP/UDP connections, open ports, routing tables, interface statistics, and other network-related information.
Example of usage:
netstat -tuln
This command will show all listening TCP and UDP ports with their numbers and addresses, without attempting to resolve names (flags -t — TCP, -u — UDP, -l — listening, -n — numeric output). It is useful for diagnosing network issues and monitoring activity.