admin:linux:cli:tmux

tmux

Attach to last session tmux a

Ctrl + b to enter command, one of the following:

Rename session $
Detach from session d
Move to previous session (
Move to next session )
New Window c
Close current window &
Previous window p
Next window n
Scroll mode [
set setting :, then type
enable mouse support set -g mouse on
~/.bashrc
if [ -z "$TMUX" ] && [ -n "$SSH_TTY" ]; then
    tmux attach-session -t ssh || tmux new-session -s ssh
    exit
fi

Your system doesn't have xterm-256color. You could:

export TERM=xterm

Maybe the file /usr/share/terminfo/x/xterm-256color is corrupted. It may be fixed upon (system/package) upgrade / reinstall.

Meanwhile you can use other terminfo entry. You can get the available options by ls /usr/share/terminfo/x.

ln -sf /usr/share/terminfo/x/xterm-color /usr/share/terminfo/x/xterm-256color

(source)

  • Last modified: 2019-12-29 23:16