Source code of netstat

netstatnetworkingsource

Can I view the source code of netstat on my Linux machine?

Best Answer

Yes you can. Download it.

But as you don't say what flavor of linux re you using here is couple of examples:

Debian/Ubuntu related:

# What package is the netstat executable in?
apt-file search /usr/bin/netstat
# Now download the source of that package
apt-get source net-tools

CentOS/Red Hat:

yumdownloader --source net-tools
Related Question