TMUX could retain current working session. It’s pretty useful when you can’t have persistent connections to the remote server e.g. SSH login.
Key PRE
Default prefix (PRE as follows) is Ctrl + b.
If we need to input PRE + D, first press D and hold; press Ctrl + b simultaneously and release all keys.
Basic concepts
- Session: different projects
- Window: different programs in the same project
- Panel: a few files which need to be compared at the same time
Operations for sessions
- create a new session:
tmux new -s $session_name
- detach (quit) a session
PRE + D
ortmux detach
- check running sessions
PRE + S
ortmux ls
- attach (enter) a session
tmux attach -t $session_name
Operations for windows
-
create a new window
PRE + c -
return to the previous window
PRE + p -
go to the next window
PRE + n -
go to the window with the specific number
PRE + $number
i.e. No.7 window
PRE + 7
Operations for panels
-
break current panel into left and right two panels
PRE + % -
break current panel into up and down two panels
PRE + " -
switch between different panels PRE + $arrow
PREVIOUSLinux