May 2004
Beginner
368 pages
8h 44m
English
netstat is one of the most basic network service debugging tools, telling you what ports are open and whether any programs are listening on ports. For example, if you want to view all open TCP ports, run this command:
netstat -t
Table 6-2 lists the netstat options.
Table 6-2. netstat Options
Option | Description |
|---|---|
| Prints TCP port information |
| Prints UDP port information |
| Prints listening ports |
| Prints every active port |
| Disables name lookups (useful if DNS isn't working) |
Being able to list open and listening ports is good, but our good old friend lsof can go one step further.
In Finding Open Files with lsof you saw how lsof can track open files, but lsof can also list the programs currently using or listening to ports. For a complete ...