Displaying connection statistics with netstat

The netstat command is a useful utility to allow you to view some statistics regarding your current connection. We touched on it a bit in the last chapter. This command allows you to show useful networking information, such as showing you services that are listening for connections on your network card, and printing your routing table, among other things.

In the last chapter, I gave the example of netstat -tulpn to allow you to view currently connected and listening services. This command shows everything that's listening, as well as the port that it's listening on. Breaking this command down, we passed along some parameters. The first, -t, identifies that we would like to view information pertaining ...

Get Mastering Linux Network Administration now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.