tmux
Install tmux
$ sudo apt install tmux
Configuration
# ~/.tmux.conf
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
set -g mouse on
set -g history-limit 50000
set -g default-terminal "screen-256color"
set -g display-time 4000
set -g status-position top
Auto-load
Auto-load tmux when loading the terminal. [source]
# autoload tmux
# if shell is interactive, and TMUX var is set...
if [[ $- == *i* ]] && [[ -z "${TMUX}" ]]; then
tmux attach || exec tmux new-session && exit;
fi