How to display network traffic in the terminal?
Solution 1:
Here are some nice tools in the Ubuntu repositories for command line network traffic monitoring:
bmon - shows multiple interfaces at once
slurm - has nice colored graphs
tcptrack - A favorite. Tells how much bandwidth is being used and also what protocol (service/port) and destination the transmission is taking place to. Very helpful when you want to know exactly what is using up your bandwidth
Solution 2:
It's quite easy! install "iftop" with:
sudo apt-get install iftop
Then run
sudo iftop
from any terminal!
Enjoy!
Solution 3:
Someone should also have mentioned nethogs
.
sudo apt-get -y install nethogs
sudo nethogs
The thing that's different and maybe is cooler about this one is that it shows traffic per process, like the image shows
Take a look at the page
Solution 4:
There is a nice tool called speedometer that displays a graph in the terminal using Unicode block characters, colors, and even adds labels to each peak in the graph.
$ sudo apt-get install speedometer
$ speedometer -l -r wlan0 -t wlan0 -m $(( 1024 * 1024 * 3 / 2 ))
It has several options, can monitor multiple interfaces, can show multiple graphs in several rows or columns, and can even monitor the download speed of a single file (by watching the file size on disk).