Tracking data usage in terminal on Linux
This trick is particularly useful for those who use metered, limited quota connection like (tethered) mobile internet.
It's easy, the only difficult thing is determining device name — even more confusing (for me at least) their are two types of naming scheme: traditional which is used by kernel, and Predictable Network Interface Names which is used by Systemd.
Here are examples of commonly used connection types and their traditional and predictable names:
Connection type | Kernel name | Systemd name |
---|---|---|
Ethernet | eth0 | enp5s0 |
USB tethering | usb0 | enp5s0u3 |
USB Modem | ppp0 | wwp0s20u3i2 |
Wi-Fi | wlan0 | wlp2s0 |
Without further ado:
ifconfig eth0 | grep bytes
ip -s link show dev eth0
!originalworks
The @OriginalWorks bot has determined this post by @jangkrik to be original material and upvoted it!
To call @OriginalWorks, simply reply to any post with @originalworks or !originalworks in your message!
To enter this post into the daily RESTEEM contest, upvote this comment! The user with the most upvotes on their @OriginalWorks comment will win!
For more information, Click Here!
Special thanks to @reggaemuffin for being a supporter! Vote him as a witness to help make Steemit a better place!