Tmux quick start guide
Here is my minimal keyboard shortcuts guide that allows you to start using Tmux in a blink of an eye. Endless advanced commands and hotkey combinations you could always find by entering "man tmux" in a terminal.
Tmux is installed quite easily in most of common linux based systems. Just type:
$ sudo apt-get install tmux
$ sudo yum install tmux
This allows you to start using by starting it with
This command first tries to attach to existing running tmux instance and creates new in case it is not found.$ tmux a || tmux new
Ctrl+b d - Will allow you to disconnect at any time. (This is also a way it is happening when you loose ssh session. How to connect - look earlier)
Each session can have many windows:
Ctrl+b c - Create a new window.Ctrl+b 0...9 - switch to window #;
Ctrl+b p - switch to previous window;
Ctrl+b n - switch to next window;
Ctrl+b l - switch to next active window (to the one you have switched from to this window);
Ctrl+b & - close this window (Or just type exit in terminal.
One terminal can have multiple windows:
Ctrl+b % - splits current panel in part, vertically;
Ctrl+b " - splits current horizontally;
Ctrl+b →←↑↓ - switch between panels;
Ctrl+b x - close current panel (you could also type exit in a terminal window).
Minus is a scrolling behavior:
Ctrl+b PgUp - enters "copy mode", afterwards:
PgUp, PgDown - scrolling;
q - exit copy mode.
Good more complex gist of hotkeys also here: