`tmux` is a terminal multiplexer for Unix-like operating systems. It allows multiple terminal sessions to be accessed simultaneously in a single window. It is useful for running more than one command-line program at the same time. It can also be used to detach processes from their controlling terminals, allowing SSH sessions to remain active without being visible
Please refer the tmux official gitgub repository for more details like installation and more. https://github.com/tmux/tmux/wiki
We can install the tmux with following commands:
sudo apt update
sudo apt install tmux
Thats all tumx installed on your system !!!, to activate tmux, run the following command in terminal : tmux -u
tmux configs are stored in the ~/.tmux.conf file (If file not preset crete the file using your favorite text editor)
The first thing you should know is that Ctrl+b
is the default prefix in tmux. It means that running any command requires typing in the prefix first. As you probably have guessed, this is to avoid conflicts with key combinations used in other programs run in the terminal.
Ctrl+b "
:- split pane horizontallyCtrl+b %
:- split pane verticallyCtrl+b arrow key
:- switch paneHold Ctrl+b arrow key
:- resize paneCtrl+b n
:- move to the next windowCtrl+b p
:- move to the previous windowCtrl+b c
:- create a new windowCtrl+d or type exit and press Return
:- Quit tmux# Setting Default Shell
set-option -g default-shell /usr/bin/zsh
# Adjusting tmux Default Header
set-option -g status-position top
set -g status-bg blue
set -g status-fg white
set -g status-right "ziAbs"
set -g status-left ""
set-window-option -g window-status-current-bg yellow
# Setting Mouse Mode on To Select pane
set -g mouse on
# Changing the default prefix (Ctrl+b) to (Ctrl+a)
set -g prefix C-a
# Changing the Split Window Short cuts
bind d split-window -h
bind D split-window -v%