Linux: Get Realtime Bandwidth Statistics Using Stock Commands

November 14, 2006
linux-penguin

Have you ever been in Linux and wanted to watch how much bandwidth was going in and out of your box? Most have, and here’s a very simply way to do it without a GUI or installing anything extra:

# watch -n1 "ifconfig eth0 | grep Mb"

RX bytes:105209490 (100.3 Mb)  TX bytes:448524558 (427.7 Mb)

Just change your network interface in the grep bit to the one you want and you’re all set. Oh, and if you’re using Debian or Ubuntu, you may want to try grepping for "Mib" instead of "Mb".

Enjoy.:

supporting = loving

For 29.5512 years I've been creating ad-free technical tutorials and essays here. 3,047 pieces and counting.

It's a one-person effort that's also my livelihood. If it makes your day easier or more pleasant in any way, please consider supporting the work with a monthly or one-time donation.

It helps me make more content, and is deeply appreciated as well. 🫶🏼