Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

how to display the actual network traffic (wireless) in a terminal?

Additionally: Is it possible to add this info to the chart of top?

share|improve this question
Any solutions for the "Is it possible to add this info to the chart of top?" part? :) – Janaka Bandara Dec 25 '15 at 2:57

12 Answers 12

up vote 175 down vote accepted

Here are some nice tools in the Ubuntu repositories for command line network traffic monitoring:

bmon - shows multiple interfaces at once

enter image description here

slurm - has nice colored graphs

enter image description here

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

enter image description here

share|improve this answer
bmon is really cool! has a graph like slurm but not colorful. – Ethereal Jan 10 '14 at 21:27
sudo apt-get install bmon slurm tcptrack – Nabil Kadimi Oct 6 '15 at 17:44
nload deserves mentioning for better separation of upload and download (also not colourful) – Chris Apr 2 at 1:17
tcptrack is cool! – Robert Apr 9 at 10:56

It's quite easy! install "iftop" with:

    sudo apt-get install iftop

Then run

    sudo iftop

from any terminal!


share|improve this answer
To see anything, I have to run (Ubuntu using wifi): $ sudo iftop -i wlan0 – russian_spy Jun 3 '15 at 20:08

Someone should also have mentioned Nethogs, so I'm that one. The thing that's different and maybe is cooler about this one is that it shows traffic per process, like the image shows

enter image description here

Take a look at the page

share|improve this answer
To install: sudo apt-get -y install nethogs then sudo nethogs – bmaupin Sep 2 '14 at 15:18


IPTraf is a console-based network statistics utility for Linux. It gathers a variety of figures such as TCP connection packet and byte counts, interface statistics and activity indicators, TCP/UDP traffic breakdowns, and LAN station packet and byte counts.


An IP traffic monitor that shows information on the IP traffic passing over your network. Includes TCP flag information, packet and byte counts, ICMP details, OSPF packet types. General and detailed interface statistics showing IP, TCP, UDP, ICMP, non-IP and other IP packet counts, IP checksum errors, interface activity, packet size counts. A TCP and UDP service monitor showing counts of incoming and outgoing packets for common TCP and UDP application ports A LAN statistics module that discovers active hosts and shows statistics showing the data activity on them TCP, UDP, and other protocol display filters, allowing you to view only traffic you're interested in. Logging Supports Ethernet, FDDI, ISDN, SLIP, PPP, and loopback interface types. Utilizes the built-in raw socket interface of the Linux kernel, allowing it to be used over a wide range of supported network cards. Full-screen, menu-driven operation.

Protocols Recognized


Non-IP packets will simply be indicated as "Non-IP" and, on Ethernet LAN's, will be supplied with the appropriate Ethernet addresses.

Supported Interfaces

Local loopback All Linux-supported Ethernet interfaces All Linux-supported FDDI interfaces SLIP Asynchronous PPP Synchronous PPP over ISDN ISDN with Raw IP encapsulation ISDN with Cisco HDLC encapsulation Parallel Line IP



With apt:

apt-get install iptraf

Or download the source:


Current Connections:

tcp connections

Current Ports:

enter image description here

Summary of all Interfaces:

enter image description here

Detailed per Interface:

enter image description here


share|improve this answer
Can you please explain how to install and use this program? – Kaz Wolfe Aug 29 '14 at 6:49
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – LassePoulsen Aug 29 '14 at 6:59
Edit: Quoted the "About" page and added titles – jpillora Aug 29 '14 at 7:34
Edit: Added more screenshots, more links – jpillora Aug 29 '14 at 7:40

I think ifconfig [interface] will do that. Like:

gevorg@gevorg-TravelMate-3260:~$ ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 00:18:de:89:52:71  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

gevorg@gevorg-TravelMate-3260:~$ ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:16:36:bf:92:e3  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::216:36ff:febf:92e3/64 Scope:Link
          RX packets:342765 errors:0 dropped:0 overruns:0 frame:0
          TX packets:306183 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:373934806 (373.9 MB)  TX bytes:39111569 (39.1 MB)

It shows RX bytes:73934806 (373.9 MB) and TX bytes:39111569 (39.1 MB).

share|improve this answer
but this is only the over-all statistic for this session. I would see if the connection is active or not. – IndexOutOfBoundsException Feb 17 '13 at 10:38
netstat -t -u -c ? – geoh Feb 17 '13 at 10:41
tcpdump -i eth0 

That will give you a streaming information of all the data flowing from that interface (your ethernet card). Similar to wireshark.

Use ifconfig to see a list of your machines interfaces.

share|improve this answer
This will certainly display the network information... Not a very user-friendly interface, nor does it have aggregate stats. Definitely think of this like wireshark. – user2943160 Jul 6 at 18:25

Install ’vnstat’ it can show traffic for an interface. You can install some plotting packages to get some nice graphs.

share|improve this answer

Also you could use iftop utility

share|improve this answer

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 ))

Screenshot after running the previous command

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).

share|improve this answer
nice tip. thank you :) – IndexOutOfBoundsException Jun 20 '15 at 15:48
This is by far the nicest visiual graph i've ever seen in a plain text display. I will be looking into the gui library by the same author now: (source code and author: – ThorSummoner Dec 11 '15 at 23:25
@ThorSummoner: This is getting off-topic, but urwid is the library used by the awesome PuDB Python debugger. – Denilson Sá Dec 13 '15 at 1:53

If you are looking for something extremely simple, but still useful, try ifstat

$ sudo apt-get install ifstat
$ ifstat
       eth0               wlan0       
 KB/s in  KB/s out   KB/s in  KB/s out
    0.00      0.00      0.96      4.79
    0.00      0.00      0.04      0.14

It monitors all interfaces at once, printing a new line every second. Useful to pipe into another script, or to leave running and observe the bandwidth usage over time. Not as pretty as other tools, but it gets the job done.

There are some useful options listed in the manpage:

-z  Hides interface which counters are null, eg interfaces that are up but not used.
-n  Turns off displaying the header periodically.
-t  Adds a timestamp at the beginning of each line.
-T  Reports total bandwith for all monitored interfaces.
-S  Keep stats updated on the same line if possible (no scrolling nor wrapping).
-b  Reports bandwith in kbits/sec instead of kbytes/sec.
share|improve this answer
I love this command: ifstat -zntS, which outputs only network interface that are not null, with timestamps, without header showing periodically and with results in only one line (I love man pages). – Igor Vuckovic Oct 17 '15 at 19:12

Another possible tool is called nload.

Similar to slurm or bmon, but a little more simplistic.

share|improve this answer

I recently discovered wavemon which can easily be installed using apt-get install wavemon.

This tool provides information especially on the signal level of the wireless network.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.