How to monitor network connections on Linux with iftop

Konstantinos Patronas
LinuxStories
Published in
2 min readJan 12, 2020

--

iftop is a very useful command that can help us troubleshoot network issues and show statistics about download speed and network connections

to install it on ubuntu

sudo apt-get -y install iftop

Get a list of network connections and info for download / upload

sudo iftop -n -P -t -s1 -L1000
interface: wlp108s0
IP address is: 192.168.1.168
IPv6 address is: 2a02:587:e3e:d700:cc8a:4e6f:447d:4f4a
MAC address is: 34:e1:2d:55:ea:ec
Listening on wlp108s0
# Host name (port/service if enabled) last 2s last 10s last 40s cumulative
--------------------------------------------------------------------------------------------
1 [2a02:587:e3e:d700:cc8a:4e6f:447d::45536 => 76,4Kb 76,4Kb 76,4Kb 19,1KB
[2606:4700:30::681b:bb88]:http <= 4,31Mb 4,31Mb 4,31Mb 1,08MB
--------------------------------------------------------------------------------------------
Total send rate: 76,4Kb 76,4Kb 76,4Kb
Total receive rate: 4,31Mb 4,31Mb 4,31Mb
Total send and receive rate: 4,39Mb 4,39Mb 4,39Mb…

--

--

Konstantinos Patronas
LinuxStories

DevOps engineer, loves Linux, Python, cats and Rock music