Create tmux dot file
vi ~/.config/tmux/tmux.conf
add following code
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
run '~/.tmux/plugins/tpm/tpm'
Run tmux to load it
tmux source ~/.config/tmux/tmux.conf
It consist of 3 main parts
> Sessions
> Windows
> Panes
How to enter command :
enter prefix
default = Ctrl+b
Create a window :
<prefix> c
Change between windows :
<prefix> <window number > or <prefix> n or <prefix> p
Close a window :
<prefix> &
Split a window horizontally :
<prefix> %
Split a window vertically :
<prefix> "
Navigating :
<prefix> <arrow-keys>
<prefix> { }
<prefix> q <num>
Zoom into a pane :
<prefix> z
Turn a pane into a window :
<prefix> !
Close a pane :
<prefix> x
sessions
Create a session :
tmux
Create a session with a name :
tmux new -s my-session
while still on tmux session :
<prefix> :new
List the active tmux sessions : if outside the session
tmux ls
if inside the session
<prefix> s
to show window also
<prefix> w
Attach to a session : when outside tmux recent session
tmux attach
named-session
tmux attach -t my-session
new prefix c-space