Tmux is one of the most useful tool when it comes to using a linux terminal.
Tmux is a terminal multiplexer, it allows a user to access multiple terminals (or windows), each running a separate program, while providing a single screen to work on. Tmux is useful for running more than one command-line program at the same time, increasing productivity and the way you work.
In case you are seeing the error –
tmux: open terminal failed: missing or unsuitable terminal: xterm-256color
It means that you don’t have the terminal xterm-256color
. There may be several reasons for it, here are solutions how you can fix it.
First Solution,
1. Restart tmux
You will need to kill tmux server and start is back.
tmux kill-server
and then, open tmux
again by running the tmux command-
tmux
Second Solution,
2. Set TERM to xterm
Try to set the value of TERM
to xterm
in your ~/.bash_profile
file
export TERM=xterm
Third Solution,
3. Install xterm-256 from another system
In case you are absolutely looking for
Prefix
:set -g mouse on
By default the prefix is Ctrl-B
Ctrl-B
:set -g mouse on
You can also make this a default behaviour of tmux, by adding the setting in ~/.tmux.conf
–
set -g mouse on
After adding the above line to the configuration file, you canĀ reload tmux conf–
tmux source-file ~/.tmux.conf
I hope steps to fix the color issue was useful. You can also check out the completeĀ tmux cheatsheet of keyboard shortcuts and mouse shortcuts.