Citing tmux
man page:
The TERM environment variable must be set to “screen” for all programs running inside tmux. New windows will automatically have “TERM=screen” added to their environment, but care must be taken not to reset this in shell start-up files.
Is this this because tmux
session can be attached to any terminal (e.g. remote), screen
being lowest common denominator? If I know my terminal, can I force it without unexpected results, or would some unsupported capabilities break (like scrolling)?
Best Answer
It does this to take advantage of the previously-installed terminal description for GNU screen.
Both tmux and screen provide applications with (more or less) the "same" terminal descriptions to simplify connecting from different terminals. The tmux and screen programs are supposed to handle the differences between the internal (TERM=screen) and external (xterm, linux, etc). So the
screen
terminal description has been installed "everywhere" (usually by ncurses).There are some differences: