Chapter 61. Tcpdump

Don’t worry, I’m not going to try to turn you into to a network security analyst or administrator. But if you’re interested in what’s happening under the hood on your Internet connection, this chapter will introduce you to an old and respected command-line tool. Come on, pull that many-pixeled GUI quilt off of yourself and meet me at the CLI for a quick look at tcpdump.

Using Tcpdump

Most distributions include tcpdump out of the box, and most require that you run it as root. So as superuser, simply enter tcpdump at the command line. It will take the default values and go, pumping out packets as they are received. Here’s what it looks like starting out on my desktop box:

linux: #tcpdump tcpdump: verbose output suppressed, use -v ...

Get CLI for Noobies: A Primer on the Linux Command Line 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.