When you are working with remote compute, usally you use SSH. It is secure and easy. but when you are working with long running task, your ssh session will be disconnected. to prevent this kind of inproductivity, tmux comes in.
session
tmux has session. this session will be persistent as long as the remote computer is alive. You can completely restore your context-command histroy, current directory, running progrm.
1 | tmux new -s default # new session |
window
pane
window can be splitted into several panes. tmux can store/restore panes.
1 | prefix + \" : split active pane horizontally |
shortcut
1 | prefix : ctrl + b |
screen scroll
prefix + [
will initiate scroll move mode. you can use down/up, /(keyword search), pageup/pagedown to move your scren buffer. by pressing ‘q’ or ‘enter’ you can termiate this mode.
iTerm2 integration
1 | tmux -CC # create new tmux session |