small medium large xlarge

Back to: All Forums  tmux
27 Oct 2012, 17:39
R. Mark Volkmann (13 posts)

Great book so far!

It seems the only way I can get 256 colors is to start tmux with “tmux -2”. I have “set -g default-terminal “screen-256color” in my ~/.tmux.conf and I have configured iTerm2 to allow 256 colors. The perl colortest shows 256 colors when run from iTerm2, but not when run from within tmux running from iTerm2. Anything else I can check or do I have to start tmux with “tmux -2”?

30 Oct 2012, 18:33
Adrian Luff (5 posts)

You need to define your shell TERM variable. Typically: export TERM=xterm-256color

If you’re using bash, you can add this line to your .bashrc or .bash_profile.

With this tmux (and other programs) will understand you have a 256 color terminal.

Note that xterm-256color depends on whether you have the appropriate termcap library installed. You can check under “/usr/share/terminfo/*/xterm-256color” to see if your system has support.