Junior — Middle
What tools and commands can be used to monitor network activity in Linux?
sobes.tech AI
Answer from AI
To monitor network activity in Linux, you can use the following tools and commands:
netstat— shows active network connections, routing tables, interface statistics.ss— a modern alternative to netstat, faster and more informative.tcpdump— captures and analyzes network packets in real-time.iftop— displays current bandwidth usage per interface and connection.nload— monitors incoming and outgoing traffic per interface.ip— a command for managing network interfaces and displaying their status.
Example of using ss to view all TCP connections:
ss -t -a
To capture packets on the eth0 interface using tcpdump:
tcpdump -i eth0