Quicklinks: colors in tshark! | 24bit color
Part of the allure of Wireshark is the ability to identify networking problems
with the use of color. Relatively recently, tshark has gained this ability too
with the --color
flag. This article goes over how to set it up on your system.
Demonstration of tshark –color on Windows, Macos, Linux, and BSD.
Support for terminal colors depends on whether “truecolor” 24-bit colors are
implemented. One way to check for it is to query the $COLORTERM
environment
variable. If supported, echo $COLORTERM
will return truecolor
or 24bit
.
This repo keeps track whether your ${TERMINAL} supports truecolor as well as general truecolor info.
alias tshark='tshark --color'
I have tested truecolor and tshark --color
compatability across multiple terminals.
These are my recommendations:
Platform | Recommendations |
---|---|
Windows | Mobaxterm, WSL [1] |
Macos | iTerm2, upterm |
Linux | gnome-terminal, Any terminal using libvte |
BSD | gnome-terminal, Any terminal using libvte |
[1]: Note that you can call Powershell from Mobaxterm or WSL, but given that Powershell does not support truecolor, you are limited to using bash pseudo-terminals on Windows to get truecolor.
As with most things terminal, using on Windows is harder
NOTE: I filed a bug for tshark on Windows, and a fix may be available in the latest dev version of Wireshark.
I created a hack that will allow you to use tshark --color
while capturing on
Windows by using both Windows and Linux tsharks.
sudo apt install tshark
~/.bashrc
:source ~/.bashrc
tshark
command with no options: