Tmux
Tmux (Terminal multiplexer) lets you switch easily between several programs in one terminal, detach them (they keep running in the background) and reattach them to a different terminal. Users can have multiple sessions, each session can have multiple windows, and each window can have multiple panes. So you can debug and run you code in one window using several panes. It's easy for you to detach terminal panes in one computer and attach them on other computer. Even when you lose your connection with the server, your programs are still running on the server.
Here is the graph illustration of the relationship between session, window and pane.
Here is the user interface of tmux:
Environment Setting
The default prefix of tmux is Ctrl+b. It is recommended to set the prefix as Ctrl+a, and you need to add this to~/.tmux.conf
:
set -g prefix ^a
unbind ^b
bind a send-prefix
bind ^z run "tmux-zoom"
set-window-option -g mode-keys vi
After create or modify ~/.tmux.conf, remember to use source command to activate the setting:
source ~\.tmux.conf
Basic Usage
Here are tmux shortcuts & cheat sheet for your reference: https://gist.github.com/MohamedAlaa/2961058