Tmux - Awesome Tool for Efficient Work
Published:
This is about tmux — Terminal Multiplexer for newbies such as me.
Concepts
- Shell env could start multiple tmux sessions
- A session could start multiple windows which could be compared to virtual desktops
- A window (usually assigned with a number) could contain multiple panes
- A Pane is the part which you directly work with
Commands on Sessions
- Begin with a shell env
tmux new -s(ession) session_name
, start and come into a tmux session env named ‘session_name’C-b d(etach)
, back to shell env, while holding tmux sessions backgroundtmux ls
(in sell env),C-b s(ession)
(in tmux session env), list running sessionstmux a(ttach) -t(arget) session_name
, come into session env from shell envtmux kill-session -t session_name
,tmux rename -t old_name new_name
,C-b $new_name
Commands on Windows
C-b c(reate)
, create a window env (in a session env)C-b w(windows)
, list all windows in the current sessionC-b n(ext)/p(revious)/0/l
, switch windowsC-b &
, close current window
Commands on Panes
C-b %
, split current pane verticallyC-b "
, split current pane horizontallyC-b o/up/down/left/right
, swith paneC-b x
, close current paneC-b PGUP/PGDN
, look through input/output history
Others?
Before C-b
, an Esc
might be necessary